{"openapi":"3.1.0","info":{"version":"1.0.0","title":"Speckle Automate API","description":"This is the API"},"security":[{"bearerAuth":[]}],"servers":[{"url":"/"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"CreateAutomationResponse":{"type":"object","properties":{"automationId":{"type":"string"},"token":{"type":"string"}},"required":["automationId","token"]},"CreateAutomationInput":{"type":"object","properties":{"speckleServerAuthenticationPayload":{"type":"object","properties":{"origin":{"type":"string","minLength":1,"format":"uri"},"code":{"type":"string"},"userId":{"type":"string","minLength":1},"action":{"type":"string","enum":["createAutomation","triggerAutomation","createFunction","updateFunction","listWorkspaceFunctions","listUserFunctions","becomeFunctionAuthor","getAvailableGithubOrganizations","generateFunctionToken","generateAutomationToken"]}},"required":["origin","code","userId","action"],"description":"The object containing the authentication code, user id and action, which must be provided as part of the request. This code is sent to the registered Speckle server. It is used to validate that the request for a new Automation on behalf of the registered Speckle server was indeed sent by it."}},"required":["speckleServerAuthenticationPayload"]},"FunctionReleaseId":{"type":"string"},"FunctionRelease":{"type":"object","properties":{"functionVersionId":{"$ref":"#/components/schemas/FunctionReleaseId"},"versionTag":{"type":"string"},"inputSchema":{"type":["object","null"],"additionalProperties":{}},"createdAt":{"type":"string"},"commitId":{"type":"string"}},"required":["functionVersionId","versionTag","inputSchema","createdAt","commitId"]},"FunctionId":{"type":"string"},"CreateAutomationRunResponse":{"type":"object","properties":{"automationRunId":{"type":"string"}},"required":["automationRunId"]},"CreateAutomationRunInput":{"type":"object","properties":{"speckleServerAuthenticationPayload":{"type":"object","properties":{"origin":{"type":"string","minLength":1,"format":"uri"},"code":{"type":"string"},"userId":{"type":"string","minLength":1},"action":{"type":"string","enum":["createAutomation","triggerAutomation","createFunction","updateFunction","listWorkspaceFunctions","listUserFunctions","becomeFunctionAuthor","getAvailableGithubOrganizations","generateFunctionToken","generateAutomationToken"]}},"required":["origin","code","userId","action"],"description":"The object containing the authentication code, user id and action, which must be provided as part of the request. This code is sent to the registered Speckle server. It is used to validate that the request for a new Automation on behalf of the registered Speckle server was indeed sent by it."},"projectId":{"type":"string","description":"The Speckle project that is associated with this automation and triggers."},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"payload":{"type":"object","properties":{"modelId":{"type":["string","null"]}},"required":["modelId"]},"triggerType":{"type":"string","enum":["modelCreation"]}},"required":["payload","triggerType"]},{"type":"object","properties":{"payload":{"type":"object","properties":{"modelId":{"type":["string","null"]},"versionId":{"type":["string","null"]}},"required":["modelId","versionId"]},"triggerType":{"type":"string","enum":["versionCreation"]}},"required":["payload","triggerType"]},{"type":"object","properties":{"payload":{"type":"object","properties":{"modelId":{"type":"string"},"fileUploadId":{"type":"string"}},"required":["modelId","fileUploadId"]},"triggerType":{"type":"string","enum":["fileUploaded"]}},"required":["payload","triggerType"]}]},"minItems":1},"speckleToken":{"type":"string","description":"The Speckle token which will be passed to this automation run."},"functionDefinitions":{"type":"array","items":{"type":"object","properties":{"functionId":{"type":"string"},"functionReleaseId":{"type":"string","minLength":5},"functionInputs":{"type":["object","null"],"additionalProperties":{},"description":"The inputs to the function. The inputs must conform to the function's input schema. If the function does not require inputs, this field should be null."},"functionRunId":{"type":"string","description":"An ID used by the speckle server to uniquely identify this function run."},"requestedCPUm":{"type":"number"},"requestedMemoryMi":{"type":"number"}},"required":["functionId","functionReleaseId","functionInputs","functionRunId"]},"minItems":1}},"required":["speckleServerAuthenticationPayload","projectId","triggers","speckleToken","functionDefinitions"]},"Function":{"type":"object","properties":{"functionId":{"$ref":"#/components/schemas/FunctionId"},"userId":{"type":["string","null"]},"functionCreatorId":{"type":["string","null"]},"functionCreator":{"type":["object","null"],"properties":{"speckleUserId":{"type":"string"},"speckleServerOrigin":{"type":"string"}},"required":["speckleUserId","speckleServerOrigin"]},"repoUrl":{"type":"string","format":"uri"},"functionName":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"supportedSourceApps":{"type":"array","items":{"type":"string","enum":["Dynamo","Revit","AutoCAD","Civil3D","Blender","Rhino","Grasshopper","Excel","Unity","Unreal","Python",".NET","IFC","QGIS","ArcGIS","ETABS","PowerBI","SketchUp","SAP2000","CSiBridge","SAFE","Archicad","Tekla Structures","OpenRoads","OpenRail","OpenBuildings","MicroStation","Navisworks","Speckle Automate"]}},"createdAt":{"type":"string"},"isFeatured":{"type":"boolean"},"logo":{"type":["string","null"]},"workspaceIds":{"type":["array","null"],"items":{"type":"string"}},"automationCount":{"type":"number"},"functionVersions":{"type":"array","items":{"$ref":"#/components/schemas/FunctionRelease"}}},"required":["functionId","userId","functionCreatorId","functionCreator","repoUrl","functionName","description","tags","supportedSourceApps","createdAt","isFeatured","logo","workspaceIds","automationCount","functionVersions"]},"FunctionsAuthGitHubAppGetResponseBody":{"type":"object","properties":{"userHasAuthorizedGitHubApp":{"type":"boolean","description":"True indicates that the user has authorized the GitHub application."}},"required":["userHasAuthorizedGitHubApp"]},"LogsResponse":{"type":"string"},"AutomationId":{"type":"string"},"GetFunctionsResponse":{"type":"object","properties":{"cursor":{"type":["string","null"]},"totalCount":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Function"}}},"required":["cursor","totalCount","items"]},"FunctionVersionPostResponseSchema":{"type":"object","properties":{"versionId":{"type":"string"}},"required":["versionId"]},"FunctionVersionPostRequestSchema":{"type":"object","properties":{"commitId":{"type":"string","minLength":6},"versionTag":{"type":"string","pattern":"^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}$"},"inputSchema":{"type":"object"},"command":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"annotations":{"type":"object","properties":{"speckle.systems/v1alpha1/publishing/status":{"type":"string","enum":["publish","draft","archive"],"default":"draft","description":"Whether this Function is published (and should appear in the library), a draft, or archived."},"speckle.systems/v1alpha1/author":{"type":"string","description":"The name of the authoring organization or individual of this Function."},"speckle.systems/v1alpha1/license":{"type":"string","enum":["MIT","BSD","Apache-2.0","MPL","CC0","Unlicense"],"description":"The license under under which this Function is made available. This must match the license in the source code repository."},"speckle.systems/v1alpha1/website":{"type":"string","format":"uri","description":"The marketing website for this Function or its authors."},"speckle.systems/v1alpha1/documentation":{"type":"string","format":"uri","description":"The documentation website for this function. For example, this could be a url to the README in the source code repository."},"speckle.systems/v1alpha1/keywords":{"type":"string","description":"Comma separated list of keywords used for categorizing this function."},"speckle.systems/v1alpha1/description":{"type":"string"}},"required":["speckle.systems/v1alpha1/publishing/status"]},"recommendedCPUm":{"type":"integer","minimum":100,"maximum":14000,"default":1000},"recommendedMemoryMi":{"type":"integer","minimum":1,"maximum":60000,"default":1000}},"required":["commitId","versionTag","inputSchema","command"]},"CreateFunctionFromTemplateResponse":{"type":"object","properties":{"functionId":{"type":"string"},"functionToken":{"type":"string"},"repo":{"type":"object","properties":{"htmlUrl":{"type":"string"},"gitUrl":{"type":"string"},"sshUrl":{"type":"string"},"owner":{"type":"string"},"name":{"type":"string"},"defaultBranch":{"type":"string"}},"required":["htmlUrl","gitUrl","sshUrl","owner","name","defaultBranch"]}},"required":["functionId","functionToken","repo"]},"CreateFunctionFromTemplateInput":{"type":"object","properties":{"speckleServerAuthenticationPayload":{"type":"object","properties":{"origin":{"type":"string","minLength":1,"format":"uri"},"code":{"type":"string"},"userId":{"type":"string","minLength":1},"action":{"type":"string","enum":["createAutomation","triggerAutomation","createFunction","updateFunction","listWorkspaceFunctions","listUserFunctions","becomeFunctionAuthor","getAvailableGithubOrganizations","generateFunctionToken","generateAutomationToken"]}},"required":["origin","code","userId","action"],"description":"The object containing the authentication code, user id and action, which must be provided as part of the request. This code is sent to the registered Speckle server. It is used to validate that the request for a new function on behalf of the registered Speckle server was indeed sent by it."},"template":{"type":"string","enum":["python",".net","typescript","demonstration","demonstrationpython"]},"functionName":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"supportedSourceApps":{"type":"array","items":{"type":"string","enum":["Dynamo","Revit","AutoCAD","Civil3D","Blender","Rhino","Grasshopper","Excel","Unity","Unreal","Python",".NET","IFC","QGIS","ArcGIS","ETABS","PowerBI","SketchUp","SAP2000","CSiBridge","SAFE","Archicad","Tekla Structures","OpenRoads","OpenRail","OpenBuildings","MicroStation","Navisworks","Speckle Automate"]}},"tags":{"type":"array","items":{"type":"string"}},"logo":{"type":["string","null"]},"org":{"type":["string","null"]}},"required":["speckleServerAuthenticationPayload","template","functionName","description","supportedSourceApps","tags","logo"]},"PatchFunctionInput":{"type":"object","properties":{"speckleServerAuthenticationPayload":{"type":"object","properties":{"origin":{"type":"string","minLength":1,"format":"uri"},"code":{"type":"string"},"userId":{"type":"string","minLength":1},"action":{"type":"string","enum":["createAutomation","triggerAutomation","createFunction","updateFunction","listWorkspaceFunctions","listUserFunctions","becomeFunctionAuthor","getAvailableGithubOrganizations","generateFunctionToken","generateAutomationToken"]}},"required":["origin","code","userId","action"],"description":"The object, containing origin, speckle server user ID, requested Action, and authentication code, which must must be provided as part of the request. This code is sent to the registered Speckle server. It is used to validate that the request for a new function on behalf of the registered Speckle server was indeed sent by it."},"functionName":{"type":"string"},"description":{"type":"string"},"supportedSourceApps":{"type":"array","items":{"type":"string","enum":["Dynamo","Revit","AutoCAD","Civil3D","Blender","Rhino","Grasshopper","Excel","Unity","Unreal","Python",".NET","IFC","QGIS","ArcGIS","ETABS","PowerBI","SketchUp","SAP2000","CSiBridge","SAFE","Archicad","Tekla Structures","OpenRoads","OpenRail","OpenBuildings","MicroStation","Navisworks","Speckle Automate"]}},"tags":{"type":"array","items":{"type":"string"}},"logo":{"type":["string","null"]},"workspaceIds":{"type":"array","items":{"type":"string"}}},"required":["speckleServerAuthenticationPayload"]},"RegenerateTokenResponse":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"RegenerateTokenInput":{"type":"object","properties":{"speckleServerAuthenticationPayload":{"type":"object","properties":{"origin":{"type":"string","minLength":1,"format":"uri"},"code":{"type":"string"},"userId":{"type":"string","minLength":1},"action":{"type":"string","enum":["createAutomation","triggerAutomation","createFunction","updateFunction","listWorkspaceFunctions","listUserFunctions","becomeFunctionAuthor","getAvailableGithubOrganizations","generateFunctionToken","generateAutomationToken"]}},"required":["origin","code","userId","action"],"description":"The object containing the authentication code, user id and action, which must be provided as part of the request. This code is sent to the registered Speckle server. It is used to validate that the request for a regenerated token on behalf of the registered Speckle server was indeed sent by it."}},"required":["speckleServerAuthenticationPayload"]}},"parameters":{}},"paths":{"/api/v2/automations":{"post":{"tags":["v2","automations"],"summary":"Create a new automation","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"string"}]},"required":false,"name":"authorization","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationInput"},"example":{"speckleServerAuthenticationPayload":{"origin":"https://example.com:1234","code":"valid-code","action":"createAutomation","userId":"valid-user-id"}}}}},"responses":{"201":{"description":"Successfully created automation result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationResponse"}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v1/functions/{functionId}/versions/{functionVersionId}":{"get":{"tags":["functions"],"summary":"Get a specific function version","parameters":[{"schema":{"$ref":"#/components/schemas/FunctionId"},"required":true,"name":"functionId","in":"path"},{"schema":{"$ref":"#/components/schemas/FunctionReleaseId"},"required":true,"name":"functionVersionId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"X-Request-Id","in":"header"},{"schema":{"anyOf":[{"type":"string"},{"type":"string"}]},"required":false,"name":"authorization","in":"header"}],"responses":{"200":{"description":"The function version data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionRelease"}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v2/automations/{automationId}/runs":{"post":{"tags":["v2","automations"],"summary":"Create a new automation run","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationRunInput"},"example":{"projectId":"asdf1234","speckleToken":"tokenString","speckleServerAuthenticationPayload":{"origin":"https://example.com:1234","code":"valid-code","action":"createAutomation","userId":"valid-user-id"},"triggers":[{"payload":{"modelId":"asdf1234","versionId":"asdf1234"},"triggerType":"versionCreation"}],"functionDefinitions":[{"functionInputs":null,"functionId":"asdf1234","functionReleaseId":"asdf1234","functionRunId":"asdf1234"}]}}}},"responses":{"201":{"description":"Successfully created automation run data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAutomationRunResponse"}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v1/functions/{functionId}":{"get":{"tags":["functions"],"summary":"Get a specific function with paginated versions","parameters":[{"schema":{"$ref":"#/components/schemas/FunctionId"},"required":true,"name":"functionId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":["number","null"],"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"versionsFilter","in":"query"}],"responses":{"200":{"description":"The function data","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Function"},{"type":"object","properties":{"versionCount":{"type":"number"},"versionCursor":{"type":["string","null"]}},"required":["versionCount","versionCursor"]}]}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v2/functions/auth/githubapp/organizations":{"get":{"tags":["functions"],"parameters":[{"schema":{"type":"object","properties":{"origin":{"type":"string","minLength":1,"format":"uri"},"code":{"type":"string"},"userId":{"type":"string","minLength":1},"action":{"type":"string","enum":["createAutomation","triggerAutomation","createFunction","updateFunction","listWorkspaceFunctions","listUserFunctions","becomeFunctionAuthor","getAvailableGithubOrganizations","generateFunctionToken","generateAutomationToken"]}},"required":["origin","code","userId","action"],"description":"The JSON-stringified object containing the authentication code, user id and action, which must be provided as part of the request. This code is sent to the registered Speckle server. It is used to validate that the request for a new Automation on behalf of the registered Speckle server was indeed sent by it."},"required":true,"name":"speckleServerAuthenticationPayload","in":"query"}],"responses":{"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v2/functions/auth/githubapp":{"get":{"tags":["functions"],"parameters":[{"schema":{"type":"string","minLength":1,"format":"uri","description":"The origin of the speckle server which is requesting the status of the user."},"required":true,"name":"speckleServerOrigin","in":"query"},{"schema":{"type":"string","minLength":1},"required":true,"name":"speckleUserId","in":"query"}],"responses":{"200":{"description":"Whether the user from this origin has authorized Speckle Automate's GitHub application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionsAuthGitHubAppGetResponseBody"}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v2/automations/{automationId}/runs/{runId}/logs":{"get":{"tags":["runs"],"summary":"Get the logs of a specific run of an automation.","parameters":[{"schema":{"$ref":"#/components/schemas/AutomationId"},"required":true,"name":"automationId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"runId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"X-Request-Id","in":"header"}],"responses":{"200":{"description":"The logs of a specific run of an automation.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/LogsResponse"}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v1/functions":{"get":{"tags":["functions"],"parameters":[{"schema":{"type":"string"},"required":false,"name":"query","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":["number","null"],"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"functionsWithoutVersions","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"featuredFunctionsOnly","in":"query"}],"responses":{"200":{"description":"The functions matching the query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFunctionsResponse"}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/v2":{"get":{"tags":["registry"],"summary":"Docker registry v2 API","responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized."},"404":{"description":"Not found."}}}},"/api/v2/dockerauth":{"get":{"tags":["registry"],"summary":"Basic Auth authentication for Docker Clients. Echoes the basic auth password back to the Docker client to use a the Bearer token for subsequent requests to the registry proxy.","parameters":[{"schema":{"type":"string"},"required":true,"name":"www-authorization","in":"header"}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized."},"404":{"description":"Not found."}}}},"/v2/{repository}/manifests/{reference}":{"get":{"tags":["registry"],"summary":"Docker registry v2 API for getting a manifest from a repository.","responses":{"200":{"description":"OK"},"404":{"description":"Not found."}}},"head":{"tags":["registry"],"summary":"Docker registry v2 API for manifests","responses":{"200":{"description":"OK"},"404":{"description":"Not found."}}},"put":{"tags":["registry"],"summary":"Docker registry v2 API for adding manifests","responses":{"201":{"description":"OK"},"404":{"description":"Not found."}}}},"/v2/{repository}/blobs/{digest}":{"get":{"tags":["registry"],"summary":"Docker registry v2 API for pulling a blob from a repository.","responses":{"200":{"description":"OK"},"404":{"description":"Not found."}}},"head":{"tags":["registry"],"summary":"Docker registry v2 API for blobs","responses":{"200":{"description":"OK"},"404":{"description":"Not found."}}}},"/v2/{repository}/blobs/uploads":{"post":{"tags":["registry"],"summary":"Docker registry v2 API for uploading blobs","responses":{"201":{"description":"Created"},"202":{"description":"OK"},"400":{"description":"Bad request."},"404":{"description":"Not found."}}}},"/v2/{repository}/blobs/uploads/{any}":{"put":{"tags":["registry"],"summary":"Docker registry v2 API for completion of the uploading of blobs in chunks.","responses":{"201":{"description":"Created"},"400":{"description":"Bad request."},"404":{"description":"Not found."}}}},"/api/v1/functions/{functionId}/versions":{"post":{"tags":["functions"],"summary":"Create a new function version","parameters":[{"schema":{"$ref":"#/components/schemas/FunctionId"},"required":true,"name":"functionId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionVersionPostRequestSchema"},"example":{"commitId":"yourCommitSHA","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://example.com/product.schema.json","title":"Product","description":"A product from Acme's catalog","type":"object","properties":{"productId":{"description":"The unique identifier for a product","type":"integer"}},"required":["productId"]},"versionTag":"123.45.67","command":["echo","Hello Speckle Automate"]}}}},"responses":{"201":{"description":"Successfully created function result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunctionVersionPostResponseSchema"}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v2/functions/from-template":{"post":{"tags":["functions"],"summary":"Create a new function from template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFunctionFromTemplateInput"},"example":{"template":"python","functionName":"my function","description":"# Heading \nThis is a markdown field!","supportedSourceApps":["Dynamo","Revit","AutoCAD","Civil3D"],"tags":["tag1","tag2"],"logo":"data:image/gif;base64,R0lGODlhAQABAAAAACw=","org":"some-github-org"}}}},"responses":{"201":{"description":"Successfully created function result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFunctionFromTemplateResponse"}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v2/functions/{functionId}":{"patch":{"tags":["functions"],"summary":"Update an existing function data","parameters":[{"schema":{"$ref":"#/components/schemas/FunctionId"},"required":true,"name":"functionId","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":false,"name":"X-Request-Id","in":"header"},{"schema":{"anyOf":[{"type":"string"},{"type":"string"}]},"required":false,"name":"authorization","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchFunctionInput"}}}},"responses":{"200":{"description":"The updated function data","content":{"application/json":{"schema":{"type":"object","properties":{"functionId":{"$ref":"#/components/schemas/FunctionId"},"userId":{"type":["string","null"]},"functionCreatorId":{"type":["string","null"]},"functionCreator":{"type":["object","null"],"properties":{"speckleUserId":{"type":"string"},"speckleServerOrigin":{"type":"string"}},"required":["speckleUserId","speckleServerOrigin"]},"repoUrl":{"type":"string","format":"uri"},"functionName":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"supportedSourceApps":{"type":"array","items":{"type":"string","enum":["Dynamo","Revit","AutoCAD","Civil3D","Blender","Rhino","Grasshopper","Excel","Unity","Unreal","Python",".NET","IFC","QGIS","ArcGIS","ETABS","PowerBI","SketchUp","SAP2000","CSiBridge","SAFE","Archicad","Tekla Structures","OpenRoads","OpenRail","OpenBuildings","MicroStation","Navisworks","Speckle Automate"]}},"createdAt":{"type":"string"},"isFeatured":{"type":"boolean"},"logo":{"type":["string","null"]},"workspaceIds":{"type":["array","null"],"items":{"type":"string"}}},"required":["functionId","userId","functionCreatorId","functionCreator","repoUrl","functionName","description","tags","supportedSourceApps","createdAt","isFeatured","logo","workspaceIds"]}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v2/functions/[functionid]/tokens/regenerate":{"post":{"tags":["v2","auth"],"summary":"Revokes any existing tokens for the function and generates one new function API token.","description":"This can only be performed by the speckle server which owns the function.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateTokenInput"}}}},"responses":{"201":{"description":"Successfully revoked existing tokens and generated a new function token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateTokenResponse"}}}},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}},"/api/v2/functions/auth/githubapp/authorize":{"get":{"tags":["functions"],"parameters":[{"schema":{"type":"object","properties":{"origin":{"type":"string","minLength":1,"format":"uri"},"code":{"type":"string"},"userId":{"type":"string","minLength":1},"action":{"type":"string","enum":["createAutomation","triggerAutomation","createFunction","updateFunction","listWorkspaceFunctions","listUserFunctions","becomeFunctionAuthor","getAvailableGithubOrganizations","generateFunctionToken","generateAutomationToken"]}},"required":["origin","code","userId","action"],"description":"The JSON-stringified object containing the authentication code, user id and action, which must be provided as part of the request. This code is sent to the registered Speckle server. It is used to validate that the request for a new Automation on behalf of the registered Speckle server was indeed sent by it."},"required":true,"name":"speckleServerAuthenticationPayload","in":"query"}],"responses":{"307":{"description":"Start the authentication process for the GitHub app. The user will be redirected to the GitHub OAuth page."},"401":{"description":"Authorization information is missing or invalid."},"403":{"description":"Forbidden, your provided authorization doesn't have enough privileges"},"422":{"description":"Bad request"}}}}},"webhooks":{}}