Add enrolling package
POST
/api/v1/environments/{env}/packages
const url = 'https://osctrl.net/api/v1/environments/example/packages';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"architecture":"example","is_default":true,"type":"example","url":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://osctrl.net/api/v1/environments/example/packages \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "architecture": "example", "is_default": true, "type": "example", "url": "example" }'Adds a new enrolling package to an environment.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”env
required
string
Environment name or UUID
Request Bodyrequired
Section titled “Request Bodyrequired”Request body
Media typeapplication/json
object
architecture
string
is_default
boolean
type
string
url
string
Examplegenerated
{ "architecture": "example", "is_default": true, "type": "example", "url": "example"}Responses
Section titled “Responses”Created
Media typeapplication/json
object
architecture
string
created_at
string
environment_id
integer
id
integer
is_default
boolean
type
string
updated_at
string
url
string
Examplegenerated
{ "architecture": "example", "created_at": "example", "environment_id": 1, "id": 1, "is_default": true, "type": "example", "updated_at": "example", "url": "example"}Bad request
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Unauthorized
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Forbidden
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Not found
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Conflict
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}Internal server error
Media typeapplication/json
object
code
string
error
string
Examplegenerated
{ "code": "example", "error": "example"}