Skip to content

Bulk import environment variables

POST
/api/v1/projects/{id}/env/bulk
curl --request POST \
--url https://api.deploybase.eu/api/v1/api/v1/projects/example/env/bulk \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "content": "example", "environment": "production", "targets": [ "build" ] }'

Imports multiple environment variables from .env file format

id
required
string

Project ID

Bulk import data

Media type application/json
object
content
required
string
environment
required
string
Allowed values: production preview all
targets

Targets applies to every imported variable, with the same default as SetEnvVarRequest.

Array<string>
Allowed values: build runtime

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"data": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Bad Request

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Unauthorized

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Not Found

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Unprocessable Entity

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string

Example generated

{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Live 174db30c built