This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Create Cloud Function

1 - 1.4

post /v1/cloud-functions

Description

create a cloud_function

State ACTIVE (CURRENT)

VersionNot Before
1.4-

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

CloudFunctionCreateRequest

Responses

HTTP CodeDescriptionSchema
202AcceptedCloudFunctionCreateResponse
400Bad RequestNone
403ForbiddenNone
404Not FoundNone

Example HTTP request

Request path

/v1/cloud-functions

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = scf 1.4"

Request body

{
    "content": "sample",
    "name": "sample-function-name",
    "runtime": "Node.js:20",
    "tags": [
        {
            "key": "",
            "value": ""
        }
    ]
}

Example HTTP response

Response 202

{
    "id": "8c9f6c1c928a45b4bbd1e4da5531d656",
    "message": "Description",
    "state": "READY"
}

2 - 1.3

post /v1/cloud-functions

Description

create a cloud_function

State ACTIVE (SUPPORTED)

VersionNot Before
1.320260830

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

CloudFunctionCreateRequest

Responses

HTTP CodeDescriptionSchema
202AcceptedCloudFunctionCreateResponse
400Bad RequestNone
403ForbiddenNone
404Not FoundNone

Example HTTP request

Request path

/v1/cloud-functions

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = scf 1.3"

Request body

{
    "content": "sample",
    "name": "sample-function-name",
    "runtime": "Node.js:20",
    "tags": [
        {
            "key": "",
            "value": ""
        }
    ]
}

Example HTTP response

Response 202

{
    "id": "8c9f6c1c928a45b4bbd1e4da5531d656",
    "message": "Description",
    "state": "READY"
}

3 - 1.2

post /v1/cloud-functions

Description

create a cloud_function

State ACTIVE (DEPRECATED)

Deprecated versions with Not Before dates that have arrived or expired are no longer supported. We recommend using the latest version.

VersionNot Before
1.220260630

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

CloudFunctionCreateRequest

Responses

HTTP CodeDescriptionSchema
202AcceptedCloudFunctionCreateResponse
400Bad RequestNone
403ForbiddenNone
404Not FoundNone

Example HTTP request

Request path

/v1/cloud-functions

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = scf 1.2"

Request body

{
    "content": "sample",
    "name": "sample-function-name",
    "runtime": "Node.js:20",
    "tags": [
        {
            "key": "",
            "value": ""
        }
    ]
}

Example HTTP response

Response 202

{
    "id": "8c9f6c1c928a45b4bbd1e4da5531d656",
    "message": "Description",
    "state": "READY"
}

4 - 1.1

post /v1/cloud-functions

Description

create a cloud_function

State ACTIVE (DEPRECATED)

Deprecated versions with Not Before dates that have arrived or expired are no longer supported. We recommend using the latest version.

VersionNot Before
1.120260430

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

CloudFunctionCreateRequest

Responses

HTTP CodeDescriptionSchema
202AcceptedCloudFunctionCreateResponse
400Bad RequestNone
403ForbiddenNone
404Not FoundNone

Example HTTP request

Request path

/v1/cloud-functions

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = scf 1.1"

Request body

{
    "content": "sample",
    "name": "sample-function-name",
    "runtime": "Node.js:20",
    "tags": [
        {
            "key": "",
            "value": ""
        }
    ]
}

Example HTTP response

Response 202

{
    "id": "8c9f6c1c928a45b4bbd1e4da5531d656",
    "message": "Description",
    "state": "READY"
}

5 - 1.0

post /v1/cloud-functions

Description

create a cloud_function

State ACTIVE (DEPRECATED)

Deprecated versions with Not Before dates that have arrived or expired are no longer supported. We recommend using the latest version.

VersionNot Before
1.020251231

Parameters

TypeNameDescriptionSchemaDefault
bodybody
required

CloudFunctionCreateRequest

Responses

HTTP CodeDescriptionSchema
202AcceptedCloudFunctionCreateResponse
400Bad RequestNone
403ForbiddenNone
404Not FoundNone

Example HTTP request

Request path

/v1/cloud-functions

Request header

"Scp-Accesskey = 2sd2gg=2agbdSD26svcD",
"Scp-Signature = fsfsdf235f9U35sdgf35Xsf/qgsdgsdg326=sfsdr23rsef=",
"Scp-Timestamp = 1605290625682",
"Scp-ClientType = Openapi",
"Accept-Language = en-US",
"Scp-Api-Version = scf 1.0"

Request body

{
    "content": "sample",
    "name": "sample-function-name",
    "runtime": "Node.js:20",
    "tags": [
        {
            "key": "",
            "value": ""
        }
    ]
}

Example HTTP response

Response 202

{
    "id": "8c9f6c1c928a45b4bbd1e4da5531d656",
    "message": "Description",
    "state": "READY"
}