Cloady Docs
API ReferenceEndpointsWorkspaces

Import a service from a provider

Reads one service from the provider and returns what deployApp needs to recreate it: a `source` to pass to deployApp as it is, and the service's variables in `values`, secrets included. A service that runs an image comes back as an upload staged for it, deleted if no app uses it within three hours. The token is used for this call only and never stored, and nothing is deployed until deployApp is called.

POST
/api/workspaces/{workspaceSlug}/import/{provider}
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string
provider*string

Value in

  • "railway"
  • "render"
  • "vercel"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/workspaces/string/import/railway" \  -H "Content-Type: application/json" \  -d '{    "credentials": {      "token": "string"    },    "projectId": "string"  }'
{  "name": "string",  "owner": "string",  "repo": "string",  "defaultBranch": "string",  "hasDockerfile": true,  "deployable": true,  "template": {    "services": {      "property1": {        "image": "string",        "build": "string",        "entrypoint": "string",        "command": "string",        "environment": {          "property1": "string",          "property2": "string"        },        "env_file": ".env",        "ports": [          1        ],        "expose": [          1        ],        "volumes": [          "string"        ],        "healthcheck": {          "test": "string",          "interval": "string",          "timeout": "string",          "start_period": "string",          "retries": 1,          "disable": true        },        "configs": [          "string"        ],        "depends_on": [          "string"        ],        "deploy": {          "replicas": 0,          "resources": {            "reservations": {              "cpus": 0,              "memory": 0            },            "limits": {              "cpus": 0,              "memory": 0            }          }        },        "profiles": [          "string"        ]      },      "property2": {        "image": "string",        "build": "string",        "entrypoint": "string",        "command": "string",        "environment": {          "property1": "string",          "property2": "string"        },        "env_file": ".env",        "ports": [          1        ],        "expose": [          1        ],        "volumes": [          "string"        ],        "healthcheck": {          "test": "string",          "interval": "string",          "timeout": "string",          "start_period": "string",          "retries": 1,          "disable": true        },        "configs": [          "string"        ],        "depends_on": [          "string"        ],        "deploy": {          "replicas": 0,          "resources": {            "reservations": {              "cpus": 0,              "memory": 0            },            "limits": {              "cpus": 0,              "memory": 0            }          }        },        "profiles": [          "string"        ]      }    },    "volumes": {      "property1": null,      "property2": null    },    "configs": {      "property1": {        "content": "string",        "file": "string"      },      "property2": {        "content": "string",        "file": "string"      }    }  },  "templateFile": "string",  "templateError": "string",  "envSchema": {    "property1": {      "type": "string",      "title": "string",      "description": "string",      "default": null,      "enum": [        null      ],      "secret": true,      "generate": "string"    },    "property2": {      "type": "string",      "title": "string",      "description": "string",      "default": null,      "enum": [        null      ],      "secret": true,      "generate": "string"    }  },  "profileSchema": {    "property1": {      "title": "string",      "description": "string",      "type": "string",      "enum": [        "string"      ],      "items": {        "enum": [          "string"        ]      },      "default": "string"    },    "property2": {      "title": "string",      "description": "string",      "type": "string",      "enum": [        "string"      ],      "items": {        "enum": [          "string"        ]      },      "default": "string"    }  },  "source": {    "type": "git",    "repoUrl": "string",    "branch": "string",    "subdir": "string",    "autoDeploy": true,    "branchTracking": {      "mode": "off",      "pattern": "string"    },    "profiles": [      "string"    ]  },  "values": {    "property1": "string",    "property2": "string"  },  "port": 1,  "buildCmd": "string",  "startCmd": "string",  "domains": [    "string"  ],  "warnings": [    "string"  ]}