MENU
      Get action

        Get action


        Article summary

        Available in Classic and VPC

        View a Cloud Functions action.

        Request

        The following describes the request format for the endpoint. The request format is as follows:

        MethodURI
        GET/packages/{packageName}/actions/{actionName}

        Request headers

        For headers common to all Cloud Functions APIs, see Cloud Functions common headers.

        Request path parameters

        The following describes the parameters.

        FieldTypeRequiredDescription
        packageNameStringRequiredPackage name
        • Enter the special character "-" for actions that are not part of a package
          • <E.g.> /packages/-/actions/myaction
        actionNameStringRequiredAction name

        Request query parameters

        The following describes the parameters.

        FieldTypeRequiredDescription
        platformStringOptionalPlatform type
        • vpc | classic (default)

        Request example

        The following is a sample request.

        curl --location --request GET 'https://cloudfunctions.apigw.ntruss.com/api/v2/packages/package003/actions?platform=classic' \
        --header 'Content-Type: application/json' \
        --header 'x-ncp-apigw-timestamp: {Timestamp}' \
        --header 'x-ncp-iam-access-key: {Sub Account Access Key}' \
        --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
        Curl

        Response

        The following describes the response format.

        Response body

        The following describes the response body.

        Basic action

        The following describes the response body for basic actions.

        FieldTypeRequiredDescription
        content.custom-optionsBoolean-Set header options
        • Only support web actions
        content.descriptionString-Action description
        content.exec.binaryBoolean-Whether the action code file is binary or not
        content.exec.codeString-Action source code or Base64-encoded code file binary
        content.exec.kindString-Language used
        content.exec.mainString-Functions to execute
        content.limits.memoryInteger-Size of memory allocated to the action container
        content.limits.timeoutInteger-Maximum time an action can run
        content.nameString-Action name
        content.parametersObject-Default parameter of the action
        content.vpcObject-VPC information
        • It is displayed only if platform is vpc
        content.vpc.vpcNoInteger-Number of connected VPC
        content.vpc.subnetNoInteger-Number of connected subnet
        content.pathString-Action path
        content.raw-httpBoolean-Whether to use HTTP origin
        • Only support web actions
        content.resourceIdString-Action's resource ID
        content.webBoolean-Set web action

        Sequence action

        The following describes the response body for sequence actions.

        FieldTypeDescription
        content.descriptionStringAction description
        content.exec.componentsObject[]List of connected actions
        content.exec.kindStringAction type
        • sequence (fixed value)
        content.nameStringAction name
        content.pathStringAction path
        content.resourceIdStringAction's resource ID
        content.webBooleanSet web action

        Response status codes

        For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.

        Response example

        The following is a sample response.

        {
            "content": {
                "custom-options": false,
                "description": "Create Action",
                "exec": {
                    "binary": false,
                    "code": "function main(params) { \nlet name = params.name || \"World\";\nlet place = params.place || \"Naver\"; \n  return {payload:  \"abc\"};\n}",
                    "kind": "nodejs:16",
                    "main": "main"
                },
                "limits": {
                    "memory": 128,
                    "timeout": 60000
                },
                "name": "action000",
                "parameters": {
                    "name": "action000"
                },
                "path": "****YBNz****/package003",
                "raw-http": false,
                "resourceId": "Sy***",
                "web": false
            }
        }
        JSON

        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.