Create one runtime
Create one runtime
POSTundefined/functions/v1/runtimes
Create one runtime
Request
Header Parameters
The ID of the organization (this parameter is not required when using API key authorization)
The ID of the project (Use this if you are not going to use the X-Project-Name)
The Name of the project (Use this if you are not going to use the X-Project-Id)
The ID of the environment (Use this if you are not going to use the X-Environment-Name)
The Name of the environment (Use this if you are not going to use the X-Environment-Id)
- application/json
Bodyrequired
Indicates if the runtime is containerized.
Path to the Dockerfile (required if isContainerized is true).
Possible values: <= 255 characters
The source code language (NodeJS, Java, Python, Golang). Required if isContainerized is false.
Possible values: >= 0
and <= 10
Possible values: >= 1
The ID of the instance type
The ID of the template existing in the project
Possible values: [internal
, external
]
The ID of the integration existing in the project
runtimeVariables object[]
integration objectrequired
Responses
- 200
- 400
- 401
- 403
- 404
- 500
- 503
Success
- application/json
- Schema
- Example (auto)
Schema
true
2024-01-01T00:00:00.000Z
200
Success
Message successfully
someone-method:success
data object
{
"success": true,
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 200,
"statusText": "Success",
"message": "Message successfully",
"localization": "someone-method:success",
"data": {
"id": "1231f891-5db6-419a-8a9c-3963b2bcb425",
"name": "runtime",
"linkGitHash": "https://{repo}/tree/{branch-or-tag}"
}
}
Bad Request
- application/json
- Schema
- Example (auto)
Schema
false
null
2024-01-01T00:00:00.000Z
400
Bad Request
Message Error
someone-method:error
{
"success": false,
"data": {},
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 400,
"statusText": "Bad Request",
"message": "Message Error",
"localization": "someone-method:error"
}
Unauthorized
- application/json
- Schema
- Example (auto)
Schema
false
null
2024-01-01T00:00:00.000Z
401
Unauthorized
Message Unauthorized
someone-method:error
{
"success": false,
"data": {},
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 401,
"statusText": "Unauthorized",
"message": "Message Unauthorized",
"localization": "someone-method:error"
}
Forbidden
- application/json
- Schema
- Example (auto)
Schema
false
null
2024-01-01T00:00:00.000Z
403
Forbidden
Message Forbidden
someone-method:error
{
"success": false,
"data": {},
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 403,
"statusText": "Forbidden",
"message": "Message Forbidden",
"localization": "someone-method:error"
}
Not Found
- application/json
- Schema
- Example (auto)
Schema
false
null
2024-01-01T00:00:00.000Z
404
Not Found
Message Not Found
someone-method:error
{
"success": false,
"data": {},
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 404,
"statusText": "Not Found",
"message": "Message Not Found",
"localization": "someone-method:error"
}
Internal Server Error
- application/json
- Schema
- Example (auto)
Schema
false
null
2024-01-01T00:00:00.000Z
500
Internal Server Error
Message Internal Server Error
someone-method:error
{
"success": false,
"data": {},
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 500,
"statusText": "Internal Server Error",
"message": "Message Internal Server Error",
"localization": "someone-method:error"
}
Service Unavailable
- application/json
- Schema
- Example (auto)
Schema
false
null
2024-01-01T00:00:00.000Z
503
Service Unavailable
Message Service Unavailable
someone-method:error
{
"success": false,
"data": {},
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 503,
"statusText": "Service Unavailable",
"message": "Message Service Unavailable",
"localization": "someone-method:error"
}
Authorization: x-api-key
name: x-api-keytype: apiKeyin: header
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "undefined/functions/v1/runtimes");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("x-api-key", "<x-api-key>");
var content = new StringContent("{\n \"isContainerized\": true,\n \"dockerfile\": \"string\",\n \"sourceCodeLanguage\": \"string\",\n \"replicas\": 0,\n \"ports\": [\n 0\n ],\n \"instanceType\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"templateId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"trafficType\": \"internal\",\n \"integrationId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"runtimeVariables\": [\n {\n \"name\": \"string\",\n \"value\": \"string\",\n \"encrypted\": true,\n \"secretVariableId\": \"string\"\n }\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());