Apps And Solutions
Solution

Update the lifecycle state of a solution

1min
code examples curl location globoff request put '/developer/solutions/versions/{solutionversionid}/states' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "action" "" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "action" "" }); var requestoptions = { method 'put', headers myheaders, body raw, redirect 'follow' }; fetch("/developer/solutions/versions/{solutionversionid}/states", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("/developer/solutions/versions/{solutionversionid}/states") http = net http new(url host, url port); request = net http put new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "action" "" }) response = http request(request) puts response read body import requests import json url = "/developer/solutions/versions/{solutionversionid}/states" payload = json dumps({ "action" "" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("put", url, headers=headers, data=payload) print(response text) responses {}// something is wrong with the request such as an incorrect action { "error" { "description" "\[relevant error message here]", "additionalinfo" "\[relevant error message here]", "statuscode" 400, "timestamp" "2023 10 06t16 50 10 387z" }, "request" { "url" "", "method" "", "params" {}, "query" {}, "body" {} } }// user not authorized on the solution's organization { "error" { "description" "\[relevant error message here]", "additionalinfo" "\[relevant error message here]", "statuscode" 403, "timestamp" "2023 10 06t16 50 10 387z" }, "request" { "url" "", "method" "", "params" {}, "query" {}, "body" {} } }// solution version not found by solution version id { "error" { "description" "\[relevant error message here]", "additionalinfo" "\[relevant error message here]", "statuscode" 404, "timestamp" "2023 10 06t16 50 10 387z" }, "request" { "url" "", "method" "", "params" {}, "query" {}, "body" {} } }