Apps And Solutions
Solution
Register Solution
1 min
code examples curl location '/developer/solutions' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{"body" {"displayname" "string","solnlistingid" "string","type" "string\<app | api>","version" "string","shortdescription" "string","isconsolecompatible"\ false,"longdescription" "string","visibility" {},"supportedcountries" \[],"categories" \[],"solnurls" \["string","string"],"apps" \["string","string"],"api" {}}}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "body" { "displayname" "string", "solnlistingid" "string", "type" "string\<app | api>", "version" "string", "shortdescription" "string", "isconsolecompatible" false, "longdescription" "string", "visibility" {}, "supportedcountries" \[], "categories" \[], "solnurls" \[ "string", "string" ], "apps" \[ "string", "string" ], "api" {} } }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("/developer/solutions", 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") http = net http new(url host, url port); request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "body" { "displayname" "string", "solnlistingid" "string", "type" "string\<app | api>", "version" "string", "shortdescription" "string", "isconsolecompatible" false, "longdescription" "string", "visibility" {}, "supportedcountries" \[], "categories" \[], "solnurls" \[ "string", "string" ], "apps" \[ "string", "string" ], "api" {} } }) response = http request(request) puts response read body import requests import json url = "/developer/solutions" payload = json dumps({ "body" { "displayname" "string", "solnlistingid" "string", "type" "string\<app | api>", "version" "string", "shortdescription" "string", "isconsolecompatible" false, "longdescription" "string", "visibility" {}, "supportedcountries" \[], "categories" \[], "solnurls" \[ "string", "string" ], "apps" \[ "string", "string" ], "api" {} } }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // returns the newly created solution { "id" {} }// something is wrong in the request content { "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 provided 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" {} } }// organization found { "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" {} } }