GET
/
api
/
v1
/
draft
/
{environment}
.
{userID}
/
{namespace}
/
{pluginName}
curl --request GET \
  --url http://local.suborbital.network:{port}/api/v1/draft/{environment}.{userID}/{namespace}/{pluginName} \
  --header 'Authorization: Bearer <token>'
{
  "lang": "rust",
  "contents": " ```rust\n import { logInfo } from \"@suborbital/suborbital\"\n\n export function run(input: ArrayBuffer): ArrayBuffer {\n   let inStr = String.UTF8.decode(input)\n\n   let out = \"Hello there, \" + inStr\n\n   return String.UTF8.encode(out)\n }\n ```\n",
  "tests": [
    {
      "name": "<string>",
      "description": "<string>",
      "payload": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Builder API requests require a Bearer header with an editor token. Obtain an editor token from the Adminstrative API.

Path Parameters

environment
string
required

The root compute environment (i.e. the vendor)

userID
string
required

The vendor's user

namespace
string
required

The plugin namespace (vendor-defined groups of plugins)

pluginName
string
required

The plugin name (user-defined)

Response

200 - application/json
OK
lang
string
required

The language of a plugin

Example:

"rust"

contents
string
required

The source code of a plugin

Example:

" ```rust\n import { logInfo } from \"@suborbital/suborbital\"\n\n export function run(input: ArrayBuffer): ArrayBuffer {\n let inStr = String.UTF8.decode(input)\n\n let out = \"Hello there, \" + inStr\n\n return String.UTF8.encode(out)\n }\n ```\n"

tests
object[]

An array of tests