Skip to main content
GET
/
cloud
/
v1
/
faas
/
namespaces
/
{project_id}
/
{region_id}
/
{namespace_name}
/
functions
/
{function_name}
Get function
curl --request GET \
  --url https://api.gcore.com/cloud/v1/faas/namespaces/{project_id}/{region_id}/{namespace_name}/functions/{function_name} \
  --header 'Authorization: <api-key>'
{
  "autoscaling": {
    "max_instances": 25,
    "min_instances": 25
  },
  "build_message": "<string>",
  "build_status": "<string>",
  "code_text": "<string>",
  "created_at": "<string>",
  "dependencies": "<string>",
  "deploy_status": {},
  "description": "<string>",
  "endpoint": "<string>",
  "flavor": "<string>",
  "id": "<string>",
  "main_method": "<string>",
  "name": "<string>",
  "runtime": "<string>",
  "status": "<string>",
  "timeout": 90,
  "enable_api_key": true,
  "envs": {
    "ENV_VAR": "value"
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

namespace_name
string
required

Namespace name

function_name
string
required

Function name

Response

200 - application/json

OK

autoscaling
FaasAutoscalingSerializer · object
required

Autoscaling configuration for the function. Keys must be 'min_instances' or 'max_instances', and values must be integers between 0 and 50.

build_message
string
required

Function build message.

build_status
string
required

Function build status.

code_text
string
required

Function code text.

Required string length: 1 - 100000
created_at
string
required

Function creation date.

dependencies
string
required

Dependencies for the function to install.

Maximum string length: 100000
deploy_status
Deploy Status · object
required

Function deploy status.

description
string
required

Description of the function.

Maximum string length: 255
endpoint
string
required

Function endpoint.

flavor
string
required

The name of the flavor associated with the function.

id
string
required

Function ID.

main_method
string
required

The main startup method name.

Required string length: 1 - 100
name
string
required

Function name.

runtime
string
required

Function runtime.

status
string
required

Function status.

timeout
integer
required

Function timeout in seconds.

Required range: 0 <= x <= 180
enable_api_key
boolean | null

Enable or disable API key authentication.

Example:

true

envs
Envs · object

Environment variables for the function. Keys must match a specific regex pattern and be 1-255 characters long, and values must be 0-255 characters long.

Example:
{ "ENV_VAR": "value" }