@@ -505,6 +505,234 @@ paths:
505505
506506 await runs.cancel("run_1234");
507507
508+ " /api/v1/deployments/{deploymentId} " :
509+ parameters :
510+ - in : path
511+ name : deploymentId
512+ required : true
513+ schema :
514+ type : string
515+ description : The deployment ID.
516+ get :
517+ operationId : get_deployment_v1
518+ summary : Get deployment
519+ description : Retrieve information about a specific deployment by its ID.
520+ responses :
521+ " 200 " :
522+ description : Successful request
523+ content :
524+ application/json :
525+ schema :
526+ type : object
527+ properties :
528+ id :
529+ type : string
530+ description : The deployment ID
531+ status :
532+ type : string
533+ enum : ["PENDING", "INSTALLING", "BUILDING", "DEPLOYING", "DEPLOYED", "FAILED", "CANCELED", "TIMED_OUT"]
534+ description : The current status of the deployment
535+ contentHash :
536+ type : string
537+ description : Hash of the deployment content
538+ shortCode :
539+ type : string
540+ description : The short code for the deployment
541+ version :
542+ type : string
543+ description : The deployment version (e.g., "20250228.1")
544+ imageReference :
545+ type : string
546+ nullable : true
547+ description : Reference to the deployment image
548+ imagePlatform :
549+ type : string
550+ description : Platform of the deployment image
551+ externalBuildData :
552+ type : object
553+ nullable : true
554+ description : External build data if applicable
555+ errorData :
556+ type : object
557+ nullable : true
558+ description : Error data if the deployment failed
559+ worker :
560+ type : object
561+ nullable : true
562+ description : Worker information if available
563+ properties :
564+ id :
565+ type : string
566+ version :
567+ type : string
568+ tasks :
569+ type : array
570+ items :
571+ type : object
572+ properties :
573+ id :
574+ type : string
575+ slug :
576+ type : string
577+ filePath :
578+ type : string
579+ exportName :
580+ type : string
581+ " 401 " :
582+ description : Unauthorized - Access token is missing or invalid
583+ " 404 " :
584+ description : Deployment not found
585+ tags :
586+ - deployments
587+ security :
588+ - secretKey : []
589+ x-codeSamples :
590+ - lang : typescript
591+ source : |-
592+ const response = await fetch(
593+ `https://api.trigger.dev/api/v1/deployments/${deploymentId}`,
594+ {
595+ method: "GET",
596+ headers: {
597+ "Authorization": `Bearer ${secretKey}`,
598+ },
599+ }
600+ );
601+ const deployment = await response.json();
602+ - lang : curl
603+ source : |-
604+ curl -X GET "https://api.trigger.dev/api/v1/deployments/deployment_1234" \
605+ -H "Authorization: Bearer tr_dev_1234"
606+
607+ " /api/v1/deployments/latest " :
608+ get :
609+ operationId : get_latest_deployment_v1
610+ summary : Get latest deployment
611+ description : Retrieve information about the latest unmanaged deployment for the authenticated project.
612+ responses :
613+ " 200 " :
614+ description : Successful request
615+ content :
616+ application/json :
617+ schema :
618+ type : object
619+ properties :
620+ id :
621+ type : string
622+ description : The deployment ID
623+ status :
624+ type : string
625+ enum : ["PENDING", "INSTALLING", "BUILDING", "DEPLOYING", "DEPLOYED", "FAILED", "CANCELED", "TIMED_OUT"]
626+ description : The current status of the deployment
627+ contentHash :
628+ type : string
629+ description : Hash of the deployment content
630+ shortCode :
631+ type : string
632+ description : The short code for the deployment
633+ version :
634+ type : string
635+ description : The deployment version (e.g., "20250228.1")
636+ imageReference :
637+ type : string
638+ nullable : true
639+ description : Reference to the deployment image
640+ errorData :
641+ type : object
642+ nullable : true
643+ description : Error data if the deployment failed
644+ " 401 " :
645+ description : Unauthorized - API key is missing or invalid
646+ " 404 " :
647+ description : No deployment found
648+ tags :
649+ - deployments
650+ security :
651+ - secretKey : []
652+ x-codeSamples :
653+ - lang : typescript
654+ source : |-
655+ const response = await fetch(
656+ "https://api.trigger.dev/api/v1/deployments/latest",
657+ {
658+ method: "GET",
659+ headers: {
660+ "Authorization": `Bearer ${secretKey}`,
661+ },
662+ }
663+ );
664+ const deployment = await response.json();
665+ - lang : curl
666+ source : |-
667+ curl -X GET "https://api.trigger.dev/api/v1/deployments/latest" \
668+ -H "Authorization: Bearer tr_dev_1234"
669+
670+ " /api/v1/deployments/{version}/promote " :
671+ parameters :
672+ - in : path
673+ name : version
674+ required : true
675+ schema :
676+ type : string
677+ description : The deployment version to promote (e.g., "20250228.1").
678+ post :
679+ operationId : promote_deployment_v1
680+ summary : Promote deployment
681+ description : Promote a previously deployed version to be the current version for the environment. This makes the specified version active for new task runs.
682+ responses :
683+ " 200 " :
684+ description : Deployment promoted successfully
685+ content :
686+ application/json :
687+ schema :
688+ type : object
689+ properties :
690+ id :
691+ type : string
692+ description : The deployment ID
693+ version :
694+ type : string
695+ description : The deployment version (e.g., "20250228.1")
696+ shortCode :
697+ type : string
698+ description : The short code for the deployment
699+ " 400 " :
700+ description : Invalid request
701+ content :
702+ application/json :
703+ schema :
704+ type : object
705+ properties :
706+ error :
707+ type : string
708+ " 401 " :
709+ description : Unauthorized - API key is missing or invalid
710+ " 404 " :
711+ description : Deployment not found
712+ tags :
713+ - deployments
714+ security :
715+ - secretKey : []
716+ x-codeSamples :
717+ - lang : typescript
718+ source : |-
719+ const response = await fetch(
720+ `https://api.trigger.dev/api/v1/deployments/${version}/promote`,
721+ {
722+ method: "POST",
723+ headers: {
724+ "Authorization": `Bearer ${secretKey}`,
725+ "Content-Type": "application/json",
726+ },
727+ }
728+ );
729+ const result = await response.json();
730+ - lang : curl
731+ source : |-
732+ curl -X POST "https://api.trigger.dev/api/v1/deployments/20250228.1/promote" \
733+ -H "Authorization: Bearer tr_dev_1234" \
734+ -H "Content-Type: application/json"
735+
508736 " /api/v1/runs/{runId}/reschedule " :
509737 parameters :
510738 - $ref : " #/components/parameters/runId"
0 commit comments