diff --git a/spec.json b/spec.json index 2dafc0b7d..e2587e9c9 100644 --- a/spec.json +++ b/spec.json @@ -1,709 +1,2625 @@ { - "components": { + "components": { + "responses": { + "Error": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "Error" + } + }, + "schemas": { + "ApiCallQueryGroup": { + "description": "A response for a query on the API call table that is grouped by something.", + "properties": { + "count": { + "format": "int64", + "type": "integer" + }, + "query": { + "type": "string" + } + }, + "required": [ + "count", + "query" + ], + "type": "object" + }, + "ApiCallQueryGroupBy": { + "description": "The field of an API call to group by.", + "enum": [ + "email", + "method", + "endpoint", + "user_id", + "origin", + "ip_address" + ], + "type": "string" + }, + "ApiCallWithPrice": { + "description": "An API call with the price.\n\nThis is a join of the `APICall` and `APICallPrice` tables.", + "properties": { + "completed_at": { + "description": "The date and time the API call completed billing.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The date and time the API call was created.", + "format": "partial-date-time", + "type": "string" + }, + "duration": { + "description": "The duration of the API call.", + "format": "int64", + "nullable": true, + "type": "integer" + }, + "email": { + "description": "The user's email address.", + "type": "string" + }, + "endpoint": { + "description": "The endpoint requested by the API call.", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier for the API call." + }, + "ip_address": { + "description": "The ip address of the origin.", + "type": "string" + }, + "method": { + "allOf": [ + { + "$ref": "#/components/schemas/Method" + } + ], + "description": "The HTTP method requsted by the API call." + }, + "minutes": { + "description": "The number of minutes the API call was billed for.", + "format": "int32", + "nullable": true, + "type": "integer" + }, + "origin": { + "description": "The origin of the API call.", + "type": "string" + }, + "price": { + "description": "The price of the API call.", + "nullable": true, + "type": "number" + }, + "request_body": { + "description": "The request body sent by the API call.", + "nullable": true, + "type": "string" + }, + "request_query_params": { + "description": "The request query params sent by the API call.", + "type": "string" + }, + "response_body": { + "description": "The response body returned by the API call. We do not store this information if it is above a certain size.", + "nullable": true, + "type": "string" + }, + "started_at": { + "description": "The date and time the API call started billing.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status_code": { + "allOf": [ + { + "$ref": "#/components/schemas/StatusCode" + } + ], + "description": "The status code returned by the API call.", + "nullable": true + }, + "stripe_invoice_item_id": { + "description": "The Stripe invoice item ID of the API call if it is billable.", + "type": "string" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The API token that made the API call." + }, + "updated_at": { + "description": "The date and time the API call was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_agent": { + "description": "The user agent of the request.", + "type": "string" + }, + "user_id": { + "description": "The ID of the user that made the API call.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "method", + "token", + "updated_at", + "user_agent" + ], + "type": "object" + }, + "ApiToken": { + "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", + "properties": { + "created_at": { + "description": "The date and time the API token was created.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "description": "The unique identifier for the API token.", + "type": "string" + }, + "is_valid": { + "description": "If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token.", + "type": "boolean" + }, + "token": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The API token itself." + }, + "updated_at": { + "description": "The date and time the API token was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The ID of the user that owns the API token.", + "type": "string" + } + }, + "required": [ + "created_at", + "is_valid", + "token", + "updated_at" + ], + "type": "object" + }, + "CreatedAtSortMode": { + "description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.", + "enum": [ + "created-at-ascending", + "created-at-descending" + ], + "type": "string" + }, + "Error": { + "description": "Error information from a response.", + "properties": { + "error_code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "request_id": { + "type": "string" + } + }, + "required": [ + "message", + "request_id" + ], + "type": "object" + }, + "ExtendedUser": { + "description": "Extended user information.\n\nThis is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Zendesk.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "format": "partial-date-time", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "type": "string" + }, + "email_verified": { + "description": "The date and time the email address was verified.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the user.", + "type": "string" + }, + "image": { + "description": "The image avatar for the user. This is a URL.", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "mailchimp_id": { + "description": "The user's MailChimp ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + }, + "name": { + "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", + "type": "string" + }, + "phone": { + "description": "The user's phone number.", + "type": "string" + }, + "stripe_id": { + "description": "The user's Stripe ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "zendesk_id": { + "description": "The user's Zendesk ID. This is mostly used for internal mapping.", + "nullable": true, + "type": "string" + } + }, + "required": [ + "created_at", + "updated_at" + ], + "type": "object" + }, + "FileConversion": { + "description": "A file conversion.\n\nFor now, in the database, we only store the file conversions if we performed it asynchronously.", + "properties": { + "completed_at": { + "description": "The time and date the file conversion was completed.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time and date the file conversion was created.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." + }, + "output_file_link": { + "description": "The link to the file conversion output in our blob storage.", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionOutputFormat" + } + ], + "description": "The output format of the file conversion." + }, + "src_file_link": { + "description": "The link to the file conversion source in our blob storage.", + "type": "string" + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionSourceFormat" + } + ], + "description": "The source format of the file conversion." + }, + "started_at": { + "description": "The time and date the file conversion was started.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionStatus" + } + ], + "description": "The status of the file conversion." + }, + "updated_at": { + "description": "The time and date the file conversion was last updated.", + "format": "partial-date-time", + "type": "string" + }, + "user_id": { + "description": "The user ID of the user who created the file conversion.", + "type": "string" + }, + "worker": { + "description": "The worker node that is performing or performed the file conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status", + "updated_at" + ], + "type": "object" + }, + "FileConversionOutputFormat": { + "description": "The valid types of output file formats.", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx", + "fbxb" + ], + "type": "string" + }, + "FileConversionSourceFormat": { + "description": "The valid types of source file formats.", + "enum": [ + "stl", + "obj", + "dae", + "step", + "fbx" + ], + "type": "string" + }, + "FileConversionStatus": { + "description": "The status of a file conversion.", + "enum": [ + "Queued", + "Uploaded", + "In Progress", + "Completed", + "Failed" + ], + "type": "string" + }, + "FileConversionWithOutput": { + "description": "A file conversion as we ouput it to the user.", + "properties": { + "completed_at": { + "description": "The time and date the file conversion was completed.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time and date the file conversion was created.", + "format": "partial-date-time", + "type": "string" + }, + "id": { + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ], + "description": "The unique identifier of the file conversion.\n\nThis is the same as the API call ID." + }, + "output": { + "description": "The converted file, if completed, base64 encoded. If the conversion failed, this field will show any errors.", + "type": "string" + }, + "output_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionOutputFormat" + } + ], + "description": "The output format of the file conversion." + }, + "src_format": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionSourceFormat" + } + ], + "description": "The source format of the file conversion." + }, + "started_at": { + "description": "The time and date the file conversion was started.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/FileConversionStatus" + } + ], + "description": "The status of the file conversion." + }, + "user_id": { + "description": "The user ID of the user who created the file conversion.", + "type": "string" + } + }, + "required": [ + "created_at", + "id", + "output_format", + "src_format", + "status" + ], + "type": "object" + }, + "Method": { + "description": "The Request Method (VERB)\n\nThis type also contains constants for a number of common HTTP methods such as GET, POST, etc.\n\nCurrently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.", + "enum": [ + "OPTIONS", + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "TRACE", + "CONNECT", + "PATCH", + "EXTENSION" + ], + "type": "string" + }, + "Pong": { + "properties": { + "message": { + "description": "The pong response.", + "type": "string" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "StatusCode": { + "format": "int32", + "title": "int32", + "type": "integer" + }, + "User": { + "description": "A user.", + "properties": { + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { + "description": "The date and time the user was created.", + "format": "partial-date-time", + "type": "string" + }, + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "type": "string" + }, + "email_verified": { + "description": "The date and time the email address was verified.", + "format": "partial-date-time", + "nullable": true, + "type": "string" + }, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the user.", + "type": "string" + }, + "image": { + "description": "The image avatar for the user. This is a URL.", + "type": "string" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "name": { + "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", + "type": "string" + }, + "phone": { + "description": "The user's phone number.", + "type": "string" + }, + "updated_at": { + "description": "The date and time the user was last updated.", + "format": "partial-date-time", + "type": "string" + } + }, + "required": [ + "created_at", + "updated_at" + ], + "type": "object" + }, + "Uuid": { + "description": "A uuid.\n\nA Version 4 UUID is a universally unique identifier that is generated using random numbers.", + "format": "uuid", + "type": "string" + } + } + }, + "info": { + "contact": { + "email": "api@kittycad.io", + "url": "https://kittycad.io" + }, + "description": "API server for KittyCAD", + "title": "KittyCAD API", + "version": "0.1.0", + "x-go": { + "client": "// Create a client with your token.\nclient, err := kittycad.NewClient(\"$TOKEN\", \"your apps user agent\")\nif err != nil {\n panic(err)\n}\n\n// - OR -\n\n// Create a new client with your token parsed from the environment\n// variable: KITTYCAD_API_TOKEN.\nclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\nif err != nil {\n panic(err)\n}", + "install": "go get github.com/kittycad/kittycad.go" + } + }, + "openapi": "3.0.3", + "paths": { + "/": { + "get": { + "operationId": "get_schema", "responses": { - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - }, - "description": "Bad Request" + "200": { + "content": { + "application/json": { + "schema": {} + } }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" }, - "description": "Unauthorized" - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" }, - "description": "Not Found" - }, - "406": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" }, - "description": "Not Acceptable" - }, - "500": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorMessage" - } - } - }, - "description": "Internal Server Error" + "style": "simple" + } } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } }, - "schemas": { - "AuthSession": { - "properties": { - "created_at": { - "description": "The date and time the session/request was created.", - "format": "date-time", - "type": "string" - }, - "email": { - "description": "The user's email address.", - "format": "email", - "type": "string" - }, - "id": { - "description": "The unique identifier of the session.", - "type": "string" - }, - "image": { - "description": "The virtual machine image the instance used as a base.", - "type": "string" - }, - "ip_address": { - "description": "The IP address the request originated from.", - "format": "ip", - "type": "string" - }, - "is_valid": { - "description": "If the token is valid.", - "type": "boolean" - }, - "token": { - "description": "The token the user provided for the request.", - "type": "string" - }, - "user_id": { - "description": "The unique identifier of the user.", - "type": "string" - } - }, - "type": "object" - }, - "ErrorMessage": { - "properties": { - "code": { - "description": "Status code", - "maximum": 2147483647, - "minimum": -2147483648, - "type": "integer" - }, - "message": { - "description": "Verbose message", - "type": "string" - }, - "status": { - "description": "Short status text", - "type": "string" - } - }, - "type": "object" - }, - "FileConversion": { - "properties": { - "completed_at": { - "description": "The date and time the file conversion was completed.", - "format": "date-time", - "type": "string" - }, - "created_at": { - "description": "The date and time the file conversion was created.", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "The unique identifier of the file conversion.", - "type": "string" - }, - "output": { - "description": "The converted file, base64 encoded. If the conversion failed, this field will show any errors.", - "type": "string" - }, - "output_format": { - "$ref": "#/components/schemas/ValidOutputFileFormat" - }, - "src_format": { - "$ref": "#/components/schemas/ValidSourceFileFormat" - }, - "started_at": { - "description": "The date and time the file conversion was completed.", - "format": "date-time", - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/FileConversionStatus" - } - }, - "type": "object" - }, - "FileConversionStatus": { - "enum": [ - "Queued", - "Uploaded", - "In Progress", - "Completed", - "Failed" - ], - "type": "string" - }, - "GPUDevice": { - "properties": { - "id": { - "description": "The unique identifier of the device.", - "format": "int64", - "type": "integer" - }, - "memory_bus_width": { - "description": "The memory bus width of the device.", - "format": "int64", - "type": "integer" - }, - "memory_clock_rate": { - "description": "The memory clock rate of the device.", - "format": "int64", - "type": "integer" - }, - "name": { - "description": "The name of the device.", - "type": "string" - }, - "peak_memory_bandwidth": { - "description": "The peak memory bandwidth of the device.", - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, - "Instance": { - "properties": { - "cpu_platform": { - "description": "The CPU platform of the server instance.", - "type": "string" - }, - "description": { - "description": "The description of the server instance.", - "type": "string" - }, - "environment": { - "$ref": "#/components/schemas/ServerEnv" - }, - "git_hash": { - "description": "The git commit hash that the server binary was built from.", - "type": "string" - }, - "hostname": { - "description": "The hostname of the server instance.", - "type": "string" - }, - "id": { - "description": "The unique identifier of the server instance.", - "type": "string" - }, - "image": { - "description": "The virtual machine image the instance used as a base.", - "type": "string" - }, - "ip_address": { - "description": "The IP address of the server instance.", - "format": "ip", - "type": "string" - }, - "machine_type": { - "description": "The machine type of the server instance.", - "type": "string" - }, - "name": { - "description": "The name of the server instance.", - "type": "string" - }, - "zone": { - "description": "The zone the server instance is deployed in.", - "type": "string" - } - }, - "type": "object" - }, - "PongEnum": { - "enum": [ - "pong" - ], - "type": "string" - }, - "PongMessage": { - "properties": { - "message": { - "$ref": "#/components/schemas/PongEnum" - } - }, - "type": "object" - }, - "ServerEnv": { - "enum": [ - "production", - "development", - "preview" - ], - "type": "string" - }, - "ValidOutputFileFormat": { - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx", - "fbxb" - ], - "type": "string" - }, - "ValidSourceFileFormat": { - "enum": [ - "stl", - "obj", - "dae", - "step", - "fbx" - ], - "type": "string" - } - }, - "securitySchemes": { - "bearerAuth": { - "description": "Default HTTP Basic Authorization", - "scheme": "bearer", - "type": "http" - } - } - }, - "externalDocs": { - "description": "KittyCAD API Documentation", - "url": "https://docs.kittycad.io" - }, - "info": { - "contact": { - "email": "support@kittycad.io", - "name": "KittyCAD Support", - "url": "https://kittycad.io" - }, - "description": "The KittyCAD API", - "license": { - "name": "Apache License, Version 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0" - }, - "termsOfService": "https://kittycad.io/terms-and-conditions", - "title": "KittyCAD API", - "version": "0.0.2-e722556", + "summary": "Get OpenAPI schema.", + "tags": [ + "meta" + ], "x-go": { - "client": "// Create a client with your token.\nclient, err := kittycad.NewClient(\"$TOKEN\", \"your apps user agent\")\nif err != nil {\n panic(err)\n}\n\n// - OR -\n\n// Create a new client with your token parsed from the environment\n// variable: KITTYCAD_API_TOKEN.\nclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\nif err != nil {\n panic(err)\n}", - "install": "go get github.com/kittycad/kittycad.go" - }, - "x-python": { - "client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# KITTYCAD_API_TOKEN.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()", - "install": "pip install kittycad" + "example": "// GetSchema: Get OpenAPI schema.\nresponseGetSchema, err := client.Meta.GetSchema()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.GetSchema" } + } }, - "openapi": "3.0.0", - "paths": { - "/_internal/async/conversions/stop": { - "post": { - "description": "Stop all async conversions that are currently running. This endpoint can only be used by specific KittyCAD employees.", - "operationId": "stopAsyncConversions", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversion" - } - } - }, - "description": "OK" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Stop all async conversions", - "tags": [ - "internal" - ], - "x-go": { - "example": "// StopAsyncConversions: Stop all async conversions\n//\n// Stop all async conversions that are currently running. This endpoint can only be used by specific KittyCAD employees.\nfileConversion, err := client.Internal.StopAsyncConversions()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#InternalService.StopAsyncConversions" - }, - "x-python": { - "example": "from kittycad.models import FileConversion\nfrom kittycad.api.internal import stop_async_conversions\nfrom kittycad.types import Response\n\nfc: FileConversion = stop_async_conversions.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = stop_async_conversions.sync_detailed(client=client)\n\n# OR run async\nfc: FileConversion = await stop_async_conversions.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await stop_async_conversions.asyncio_detailed(client=client)", - "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.internal.stop_async_conversions.html" + "/api-call-metrics": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", + "operationId": "get_api_call_metrics", + "parameters": [ + { + "in": "query", + "name": "group_by", + "required": true, + "schema": { + "$ref": "#/components/schemas/ApiCallQueryGroupBy" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiCallQueryGroup" + }, + "title": "Array_of_ApiCallQueryGroup", + "type": "array" } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } }, - "/_internal/gpu/devices": { - "get": { - "description": "Get information about GPU devices on this server. This is primarily used for debugging. This endpoint can only be used by specific KittyCAD employees.", - "operationId": "gpuDevices", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/GPUDevice" - }, - "type": "array" - } - } - }, - "description": "Returns the GPU devices if successful." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get GPU devices", - "tags": [ - "internal" - ], - "x-go": { - "example": "// GPUDevices: Get GPU devices\n//\n// Get information about GPU devices on this server. This is primarily used for debugging. This endpoint can only be used by specific KittyCAD employees.\nGPUDevice, err := client.Internal.GPUDevices()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#InternalService.GPUDevices" - }, - "x-python": { - "example": "from kittycad.models import [GPUDevice]\nfrom kittycad.api.internal import gpu_devices\nfrom kittycad.types import Response\n\nfc: [GPUDevice] = gpu_devices.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[[GPUDevice]] = gpu_devices.sync_detailed(client=client)\n\n# OR run async\nfc: [GPUDevice] = await gpu_devices.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[[GPUDevice]] = await gpu_devices.asyncio_detailed(client=client)", - "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.internal.gpu_devices.html" - } - } - }, - "/_meta/debug/instance": { - "get": { - "description": "Get information about this specific API server instance. This is primarily used for debugging.", - "operationId": "instanceMetadata", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Instance" - } - } - }, - "description": "Returns the instance metadata if successful." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get instance metadata", - "tags": [ - "meta" - ], - "x-go": { - "example": "// InstanceMetadata: Get instance metadata\n//\n// Get information about this specific API server instance. This is primarily used for debugging.\ninstance, err := client.Meta.InstanceMetadata()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.InstanceMetadata" - }, - "x-python": { - "example": "from kittycad.models import Instance\nfrom kittycad.api.meta import instance_metadata\nfrom kittycad.types import Response\n\nfc: Instance = instance_metadata.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[Instance] = instance_metadata.sync_detailed(client=client)\n\n# OR run async\nfc: Instance = await instance_metadata.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[Instance] = await instance_metadata.asyncio_detailed(client=client)", - "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.instance_metadata.html" - } - } - }, - "/_meta/debug/session": { - "get": { - "description": "Get information about your API request session. This is primarily used for debugging.", - "operationId": "authSession", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthSession" - } - } - }, - "description": "Returns the authorized user's authentication session if successful." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get auth session", - "tags": [ - "meta" - ], - "x-go": { - "example": "// AuthSession: Get auth session\n//\n// Get information about your API request session. This is primarily used for debugging.\nauthSession, err := client.Meta.AuthSession()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.AuthSession" - }, - "x-python": { - "example": "from kittycad.models import AuthSession\nfrom kittycad.api.meta import auth_session\nfrom kittycad.types import Response\n\nfc: AuthSession = auth_session.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[AuthSession] = auth_session.sync_detailed(client=client)\n\n# OR run async\nfc: AuthSession = await auth_session.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[AuthSession] = await auth_session.asyncio_detailed(client=client)", - "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.auth_session.html" - } - } - }, - "/file/conversion/{id}": { - "get": { - "description": "Get the status and output of an async file conversion.", - "operationId": "fileConversionStatus", - "parameters": [ - { - "description": "The id of the file conversion.", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversion" - } - } - }, - "description": "Returns the status of the file conversion. If completed, the contents of the converted file will be returned as a base64 encoded string." - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "500": { - "$ref": "#/components/responses/500" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Get a file conversion", - "tags": [ - "file", - "beta" - ], - "x-go": { - "example": "// ConversionStatus: Get a file conversion\n//\n// Get the status and output of an async file conversion.\n//\n// Parameters:\n//\t- `id`: The id of the file conversion.\nfileConversion, err := client.File.ConversionStatus(id)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.ConversionStatus" - }, - "x-python": { - "example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import file_conversion_status_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversion = file_conversion_status_with_base64_helper.sync(client=client, id=)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = file_conversion_status_with_base64_helper.sync_detailed(client=client, id=)\n\n# OR run async\nfc: FileConversion = await file_conversion_status_with_base64_helper.asyncio(client=client, id=)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await file_conversion_status_with_base64_helper.asyncio_detailed(client=client, id=)", - "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.file_conversion_status_with_base64_helper.html" - } - } - }, - "/file/conversion/{sourceFormat}/{outputFormat}": { - "post": { - "description": "Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously.", - "operationId": "postFileConversion", - "parameters": [ - { - "description": "The format of the file to convert.", - "in": "path", - "name": "sourceFormat", - "required": true, - "schema": { - "$ref": "#/components/schemas/ValidSourceFileFormat" - } - }, - { - "description": "The format the file should be converted to.", - "in": "path", - "name": "outputFormat", - "required": true, - "schema": { - "$ref": "#/components/schemas/ValidOutputFileFormat" - } - } - ], - "requestBody": { - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversion" - } - } - }, - "description": "Returns the contents of the converted file, base64 encoded, if successful. The contents will be base64 encoded." - }, - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileConversion" - } - } - }, - "description": "The file conversion is being performed asynchronously. You can use the `id` returned from the request to get status information about the async conversion." - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "500": { - "$ref": "#/components/responses/500" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "summary": "Convert CAD file", - "tags": [ - "file", - "beta" - ], - "x-go": { - "example": "// PostConversion: Convert CAD file\n//\n// Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously.\n//\n// Parameters:\n//\t- `outputFormat`: The format the file should be converted to.\n//\t- `sourceFormat`: The format of the file to convert.\nfileConversion, err := client.File.PostConversion(sourceFormat, outputFormat, body)", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.PostConversion" - }, - "x-python": { - "example": "from kittycad.models import FileConversion\nfrom kittycad.api.file import post_file_conversion_with_base64_helper\nfrom kittycad.types import Response\n\nfc: FileConversion = post_file_conversion_with_base64_helper.sync(client=client, source_format=ValidSourceFileFormat, output_format=ValidOutputFileFormat, body=bytes)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[FileConversion] = post_file_conversion_with_base64_helper.sync_detailed(client=client, source_format=ValidSourceFileFormat, output_format=ValidOutputFileFormat, body=bytes)\n\n# OR run async\nfc: FileConversion = await post_file_conversion_with_base64_helper.asyncio(client=client, source_format=ValidSourceFileFormat, output_format=ValidOutputFileFormat, body=bytes)\n\n# OR run async with more info\nresponse: Response[FileConversion] = await post_file_conversion_with_base64_helper.asyncio_detailed(client=client, source_format=ValidSourceFileFormat, output_format=ValidOutputFileFormat, body=bytes)", - "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.file.post_file_conversion_with_base64_helper.html" - } - } - }, - "/ping": { - "get": { - "description": "Simple ping to the server.", - "operationId": "ping", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PongMessage" - } - } - }, - "description": "Returns the message \"pong\" if successful." - } - }, - "summary": "Ping", - "tags": [ - "meta" - ], - "x-go": { - "example": "// Ping: Ping\n//\n// Simple ping to the server.\npongMessage, err := client.Meta.Ping()", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Ping" - }, - "x-python": { - "example": "from kittycad.models import PongMessage\nfrom kittycad.api.meta import ping\nfrom kittycad.types import Response\n\nfc: PongMessage = ping.sync(client=client)\n\n# OR if you need more info (e.g. status_code)\nresponse: Response[PongMessage] = ping.sync_detailed(client=client)\n\n# OR run async\nfc: PongMessage = await ping.asyncio(client=client)\n\n# OR run async with more info\nresponse: Response[PongMessage] = await ping.asyncio_detailed(client=client)", - "libDocsLink": "https://python.api.docs.kittycad.io/modules/kittycad.api.meta.ping.html" - } - } + "summary": "Get API call metrics.", + "tags": [ + "api-calls" + ], + "x-go": { + "example": "// GetMetrics: Get API call metrics.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n//\n// Parameters:\n//\t- `groupBy`\nAPICallQueryGroup, err := client.APICall.GetMetrics(groupBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetMetrics" } + } }, - "servers": [ - { - "description": "Production", - "url": "https://api.kittycad.io" + "/api-calls": { + "get": { + "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiCallWithPrice" + }, + "title": "Array_of_ApiCallWithPrice", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List API calls.", + "tags": [ + "api-calls" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// List: List API calls.\n//\n// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.List(limit, pageToken, sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.List" } - ], - "tags": [ - { - "description": "CAD file operations.", - "name": "file" + } + }, + "/api-calls/{id}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", + "operationId": "get_api_call", + "parameters": [ + { + "description": "The ID of the API call.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } }, - { - "description": "Meta information about servers, instances, and sessions.", - "name": "meta" - }, - { - "description": "Beta API endpoints.", - "name": "beta" - }, - { - "description": "Internal API endpoints.", - "name": "internal" + "summary": "Get details of an API call.", + "tags": [ + "api-calls" + ], + "x-go": { + "example": "// Get: Get details of an API call.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n// If the user is not authenticated to view the specified API call, then it is not returned.\n// Only KittyCAD employees can view API calls for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.Get(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.Get" } - ] + } + }, + "/file/conversion/{src_format}/{output_format}": { + "post": { + "description": "Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the conversion is performed asynchronously, the `id` of the conversion will be returned. You can use the `id` returned from the request to get status information about the async conversion from the `/file/conversions/{id}` endpoint.", + "operationId": "create_file_conversion", + "parameters": [ + { + "description": "The format the file should be converted to.", + "in": "path", + "name": "output_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileConversionOutputFormat" + }, + "style": "simple" + }, + { + "description": "The format of the file to convert.", + "in": "path", + "name": "src_format", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileConversionSourceFormat" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversionWithOutput" + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Convert CAD file.", + "tags": [ + "file" + ], + "x-go": { + "example": "// CreateConversion: Convert CAD file.\n//\n// Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously.\n// If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// If the conversion is performed asynchronously, the `id` of the conversion will be returned. You can use the `id` returned from the request to get status information about the async conversion from the `/file/conversions/{id}` endpoint.\n//\n// Parameters:\n//\t- `outputFormat`: The format the file should be converted to.\n//\t- `srcFormat`: The format of the file to convert.\nfileConversionWithOutput, err := client.File.CreateConversion(outputFormat, srcFormat, body)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateConversion" + } + } + }, + "/file/conversions": { + "get": { + "description": "This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", + "operationId": "list_file_conversions", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/FileConversion" + }, + "title": "Array_of_FileConversion", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List file conversions.", + "tags": [ + "file" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListConversions: List file conversions.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by a KittyCAD employee.\n//\n// To iterate over all pages, use the `ListConversionsAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nFileConversion, err := client.File.ListConversions(limit, pageToken, sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.ListConversions" + } + } + }, + "/file/conversions/{id}": { + "get": { + "description": "Get the status and output of an async file conversion.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\nIf the user is not authenticated to view the specified file conversion, then it is not returned.\nOnly KittyCAD employees with the proper access can view file conversions for other users.", + "operationId": "get_file_conversion", + "parameters": [ + { + "description": "The ID of the file conversion.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversionWithOutput" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get a file conversion.", + "tags": [ + "file" + ], + "x-go": { + "example": "// GetConversion: Get a file conversion.\n//\n// Get the status and output of an async file conversion.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n// If the user is not authenticated to view the specified file conversion, then it is not returned.\n// Only KittyCAD employees with the proper access can view file conversions for other users.\n//\n// Parameters:\n//\t- `id`: The ID of the file conversion.\nfileConversionWithOutput, err := client.File.GetConversion(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversion" + } + } + }, + "/ping": { + "get": { + "operationId": "ping", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pong" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Return pong.", + "tags": [ + "meta" + ], + "x-go": { + "example": "// Ping: Return pong.\npong, err := client.Meta.Ping()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Ping" + } + } + }, + "/user": { + "get": { + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", + "operationId": "get_user_self", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get your user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// GetSelf: Get your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nuser, err := client.User.GetSelf()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelf" + } + } + }, + "/user/api-calls": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "user_list_api_calls", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiCallWithPrice" + }, + "title": "Array_of_ApiCallWithPrice", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List API calls for your user.", + "tags": [ + "api-calls" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// UserList: List API calls for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `UserListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.UserList(limit, pageToken, sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.UserList" + } + } + }, + "/user/api-calls/{id}": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.", + "operationId": "get_api_call_for_user", + "parameters": [ + { + "description": "The ID of the API call.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get an API call for a user.", + "tags": [ + "api-calls" + ], + "x-go": { + "example": "// GetForUser: Get an API call for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the API call.\naPICallWithPrice, err := client.APICall.GetForUser(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetForUser" + } + } + }, + "/user/api-tokens": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.", + "operationId": "list_api_tokens_for_user", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiToken" + }, + "title": "Array_of_ApiToken", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List API tokens for your user.", + "tags": [ + "api-tokens" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListForUser: List API tokens for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The API tokens are returned in order of creation, with the most recently created API tokens first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nAPIToken, err := client.APIToken.ListForUser(limit, pageToken, sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.ListForUser" + } + }, + "post": { + "description": "This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.", + "operationId": "create_api_token_for_user", + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + }, + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Create a new API token for your user.", + "tags": [ + "api-tokens" + ], + "x-go": { + "example": "// CreateForUser: Create a new API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\naPIToken, err := client.APIToken.CreateForUser()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.CreateForUser" + } + } + }, + "/user/api-tokens/{token}": { + "delete": { + "description": "This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", + "operationId": "delete_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Delete an API token for your user.", + "tags": [ + "api-tokens" + ], + "x-go": { + "example": "// DeleteForUser: Delete an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\n// This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n//\n// Parameters:\n//\t- `token`: The API token.\nif err := client.APIToken.DeleteForUser(token); err != nil {\n\tpanic(err)\n}", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.DeleteForUser" + } + }, + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.", + "operationId": "get_api_token_for_user", + "parameters": [ + { + "description": "The API token.", + "in": "path", + "name": "token", + "required": true, + "schema": { + "format": "uuid", + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get an API token for your user.", + "tags": [ + "api-tokens" + ], + "x-go": { + "example": "// GetForUser: Get an API token for your user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n//\n// Parameters:\n//\t- `token`: The API token.\naPIToken, err := client.APIToken.GetForUser(token)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.GetForUser" + } + } + }, + "/user/extended": { + "get": { + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", + "operationId": "get_user_self_extended", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get extended information about your user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// GetSelfExtended: Get extended information about your user.\n//\n// Get the user information for the authenticated user.\n// Alternatively, you can also use the `/users/me` endpoint.\nextendedUser, err := client.User.GetSelfExtended()", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSelfExtended" + } + } + }, + "/user/file/conversions": { + "get": { + "description": "This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\nThis endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\nThe file conversions are returned in order of creation, with the most recently created file conversions first.", + "operationId": "list_file_conversions_for_user", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/FileConversion" + }, + "title": "Array_of_FileConversion", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List file conversions for your user.", + "tags": [ + "file" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListConversionsForUser: List file conversions for your user.\n//\n// This endpoint does not return the contents of the converted file (`output`). To get the contents use the `/file/conversions/{id}` endpoint.\n// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n// The file conversions are returned in order of creation, with the most recently created file conversions first.\n//\n// To iterate over all pages, use the `ListConversionsForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nFileConversion, err := client.File.ListConversionsForUser(limit, pageToken, sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.ListConversionsForUser" + } + } + }, + "/user/file/conversions/{id}": { + "get": { + "description": "Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.", + "operationId": "get_file_conversion_for_user", + "parameters": [ + { + "description": "The ID of the file conversion.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileConversionWithOutput" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get a file conversion for your user.", + "tags": [ + "file" + ], + "x-go": { + "example": "// GetConversionForUser: Get a file conversion for your user.\n//\n// Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.\n// This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.\n//\n// Parameters:\n//\t- `id`: The ID of the file conversion.\nfileConversionWithOutput, err := client.File.GetConversionForUser(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.GetConversionForUser" + } + } + }, + "/users": { + "get": { + "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/User" + }, + "title": "Array_of_User", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List users.", + "tags": [ + "users" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// List: List users.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nUser, err := client.User.List(limit, pageToken, sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.List" + } + } + }, + "/users-extended": { + "get": { + "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users_extended", + "parameters": [ + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ExtendedUser" + }, + "title": "Array_of_ExtendedUser", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List users with extended information.", + "tags": [ + "users" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListExtended: List users with extended information.\n//\n// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n//\n// To iterate over all pages, use the `ListExtendedAllPages` method, instead.\n//\n// Parameters:\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nExtendedUser, err := client.User.ListExtended(limit, pageToken, sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.ListExtended" + } + } + }, + "/users-extended/{id}": { + "get": { + "description": "To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", + "operationId": "get_user_extended", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get extended information about a user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// GetExtended: Get extended information about a user.\n//\n// To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nextendedUser, err := client.User.GetExtended(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetExtended" + } + } + }, + "/users/{id}": { + "get": { + "description": "To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\nTo get information about any KittyCAD user, you must be a KittyCAD employee.", + "operationId": "get_user", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "Get a user.", + "tags": [ + "users" + ], + "x-go": { + "example": "// Get: Get a user.\n//\n// To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n// To get information about any KittyCAD user, you must be a KittyCAD employee.\n//\n// Parameters:\n//\t- `id`: The user ID.\nuser, err := client.User.Get(id)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.Get" + } + } + }, + "/users/{id}/api-calls": { + "get": { + "description": "This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\nIf the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls_for_user", + "parameters": [ + { + "description": "The user ID.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + { + "description": "Maximum number of items returned by a single call", + "in": "query", + "name": "limit", + "schema": { + "format": "uint32", + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "style": "form" + }, + { + "description": "Token returned by previous call to retreive the subsequent page", + "in": "query", + "name": "page_token", + "schema": { + "nullable": true, + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + }, + "style": "form" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiCallWithPrice" + }, + "title": "Array_of_ApiCallWithPrice", + "type": "array" + } + } + }, + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "required": true, + "schema": { + "type": "string" + }, + "style": "simple" + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "summary": "List API calls for a user.", + "tags": [ + "api-calls" + ], + "x-dropshot-pagination": true, + "x-go": { + "example": "// ListForUser: List API calls for a user.\n//\n// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n// The API calls are returned in order of creation, with the most recently created API calls first.\n//\n// To iterate over all pages, use the `ListForUserAllPages` method, instead.\n//\n// Parameters:\n//\t- `id`: The user ID.\n//\t- `limit`: Maximum number of items returned by a single call\n//\t- `pageToken`: Token returned by previous call to retreive the subsequent page\n//\t- `sortBy`\nAPICallWithPrice, err := client.APICall.ListForUser(id, limit, pageToken, sortBy)", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListForUser" + } + } + } + }, + "tags": [ + { + "description": "API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/api-calls" + }, + "name": "api-calls" + }, + { + "description": "API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/api-tokens" + }, + "name": "api-tokens" + }, + { + "description": "CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/file" + }, + "name": "file" + }, + { + "description": "Meta information about the API.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/meta" + }, + "name": "meta" + }, + { + "description": "A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.", + "externalDocs": { + "url": "https://docs.kittycad.io/api/users" + }, + "name": "users" + } + ] } \ No newline at end of file