Documentation menu

Unpublish org template

POSThttps://api.instacloud.com/orgs/{orgId}/templates/{code}/unpublish

Token scope: account · org — read-only tokens refused (not a GET).

Take the template out of the gallery. Deployed services keep running.

Parameters

NameInTypeRequiredDescription
orgIdpathstringyes
codepathstringyes

Responses

200

Default Response

FieldTypeRequiredDescription
templateobjectyes
template.idstringyesThe draft's stable id. A rename of its code keeps it, and a new draft gets a new one, even under a code a deleted draft had. Routes and editor links address a draft by its code.
template.codestringyes
template.orgIdstringyes
template.sourceProjectIdstring | nullyes
template.blankbooleanyesCreated with POST /orgs/{orgId}/templates, with no project behind it: every service is one the author added, and Regenerate From Project answers 400. A generated draft whose project was deleted is not blank.
template.status"draft" | "published" | "unpublished"yes
template.publishedVersionstring | nullyes
template.hasUnpublishedChangesbooleanyes
template.namestringyes
template.taglinestring | nullyes
template.categorystring | nullyes
template.readmestring | nullyes
template.defaultReadmestringyesA README skeleton built from the draft as it is now: service names and required variable names only, never a value. The console offers it behind a button; it is not stored.
template.logoUrlstring | nullyes
template.servicesobject[]yes
template.services.namestringyes
template.services.typestringyesweb with a port, worker without one, or the managed type (postgres, redis, mysql, mongodb or storage). It and the fields below are the values after the author's settings.
template.services.imagestring | nullyes
template.services.portinteger | nullyes
template.services.healthcheckstring | nullyes
template.services.volumebooleanyes
template.services.mountPathstring | nullyesnull with volume true: the volume mounts at the default /data. null with volume false: no volume.
template.services.commandstring | nullyes
template.services.alwaysOnboolean | nullyes
template.services.publicbooleannoStorage only, always present on a bucket: anonymous public-read, after the author's setting.
template.services.pgVersionintegernoPostgres only: the major a deploy creates the database on, after the author's setting. Absent when the project's database recorded none.
template.services.addedbooleannoPresent, and true, only on a service the author added: a PATCH deletes it for good. One from the project is removed instead.
template.services.removedbooleanyesThe author left this service out of the template. It stays listed so it can be restored.
template.services.variablesobject[]yesSorted by the generator's name (originalName when renamed). Empty for a managed database. A removed service lists what restoring it brings back.
template.services.variables.namestringyes
template.services.variables.kind"required" | "optional" | "default" | "reference" | "generated" | "fixed" | "removed"yes
template.services.variables.valuestringnodefault: the default text. reference: the token. fixed: the literal or the address reference.
template.services.variables.descriptionstringnoWhat whoever deploys reads. Omitted while it is the default sentence, which the console shows as an empty box.
template.services.variables.brokenReferencestringnoThe token this variable referenced before its service was removed from the template or left the project. The variable is then required.
template.services.variables.originalNamestringnoPresent only when the author renamed the variable: the generator's name, which a PATCH variables entry sends as name. name is then the new one.
template.services.variables.addedbooleannoPresent, and true, only on a variable the author added: a PATCH deletes it for good. One from the project is removed with choice removed instead.
template.referenceOptionsobject[]yesWhat a variable may reference in the template as it is now. A removed service offers nothing.
template.referenceOptions.tokenstringyesExactly what a reference choice sends and the manifest stores.
template.referenceOptions.servicestringyes
template.referenceOptions.keystringyesA credential key of a managed database or a storage bucket, or url or host of a web service.
template.editableFieldsobjectyesPer service type, the TemplateServiceSettings keys a template service of that type takes. A PATCH answers 400 for any other.
template.editableFields.web"image" | "port" | "healthcheck" | "command" | "mountPath" | "alwaysOn"[]yes
template.editableFields.worker"image" | "port" | "healthcheck" | "command" | "mountPath" | "alwaysOn"[]yes
template.editableFields.postgres"pgVersion"[]yes
template.editableFields.redisstring[]yes
template.editableFields.mysqlstring[]yes
template.editableFields.mongodbstring[]yes
template.editableFields.storage"public"[]yes
template.referenceKeysobjectyesPer managed service type, the credential keys a variable may reference on a service of that type, one the author has not applied yet included (secretNames.ts CANONICAL_KEYS). A web service's url and host are not listed.
template.referenceKeys.postgresstring[]yes
template.referenceKeys.redisstring[]yes
template.referenceKeys.mysqlstring[]yes
template.referenceKeys.mongodbstring[]yes
template.referenceKeys.storagestring[]yes
template.publishRequirementsobject[]yesAlways seven, in this order: has_service, no_blocked, no_conflicts, has_tagline, has_category, has_readme, required_descriptions.
template.publishRequirements.code"has_service" | "no_blocked" | "no_conflicts" | "has_tagline" | "has_category" | "has_readme" | "required_descriptions"yes
template.publishRequirements.okbooleanyes
template.publishRequirements.itemsstring[]yesno_blocked: each blocked reason. no_conflicts: one sentence with its fix for each name the author added that the project now has too, services first. required_descriptions: each <service>.<VAR> still without a description. Otherwise empty.
template.reportobjectyesWhat generation skipped, what blocks publishing (each with a fix), and notices.
template.report.skippedobject[]yes
template.report.skipped.servicestringno
template.report.skipped.variablestringno
template.report.skipped.reasonstringyes
template.report.skipped.fixstringno
template.report.blockedobject[]yes
template.report.blocked.servicestringno
template.report.blocked.variablestringno
template.report.blocked.reasonstringyes
template.report.blocked.fixstringno
template.report.noticesobject[]yes
template.report.notices.servicestringno
template.report.notices.variablestringno
template.report.notices.reasonstringyes
template.report.notices.fixstringno
template.updatedAtstringyes
template.takenDownbooleanyesStaff took this template down. It cannot be republished.
template.deployCountintegeryesSucceeded deployments of this template.
template.totalProjectsintegeryesDistinct projects that deployed this template since its first publish, any outcome: the number the gallery card shows (the catalog's totalProjects).

400

Default Response

FieldTypeRequiredDescription
errorstringyes

404

Default Response

FieldTypeRequiredDescription
errorstringyes

409

Default Response

FieldTypeRequiredDescription
errorstringyes

View as Markdown