Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
162 lines (115 loc) · 4.63 KB

File metadata and controls

162 lines (115 loc) · 4.63 KB
Copy raw file
Download raw file
Outline
Edit and raw actions
sidebar_position
3

👷‍♂️ Builder

Create

:::info Use this endpoint to send your function to GreenCloud so it can build and deploy it for you. You will recieve a build ID which you can use to check the status of your build. :::

::::tip tip Make sure to include the architecture type as a parameter when sending your function for it to be built.

When sending your function to be build via the API you must zip the contents of the function folder first. ::::

::::caution Caution You must zip the contents of the function folder rather than the function folder itself.

::::

Endpoint

Request Headers

Key Value Required
Authorization Valid Access Token true
Content-Type application/octet-stream true

Request Parameters

Key Example Requirements
arch amd64 required amd64

Request Body

Key Example Requirements
file MyFunction.zip required .zip

Example Request

Example Response

{
    "id": "66787d8f694aa083bbdf9aa9"
}

Get

:::info If you need to retrieve details about your build, use this endpoint by passing the build ID as a URL request parameter. The endpoint will provide you with a list of information related to build of the function. :::

Endpoint

Request Headers

Key Value Required
Authorization Valid Access Token true

Request Parameters

Value Example Required
build id 66787d8f694aa083bbdf9aa9 true

Example Request

Empty body

Example Response

{
  "functionId": "66787d8f694aa083bbdf9aa9",
  "status": "SUCCESS",
  "arch": [ "amd64"],
  "timeline": [{ "status": "PENDING", "time": "2023-07-24T21:53:08Z" }],
  "log": ["✅ Unzipping successfuly → fx.zip"]
}

List

:::info Use this endpoint to get a list of functions in your GreenCloud account. You can set optional parameters to choose which page of results to view, how many results to view and which specific function you want to inspect. :::

Endpoint

Request Headers

Key Value Required
Authorization Valid Access Token true

Query Parameters

Key Example Requirements
page 2 int optional min=1 default=1
limit 3 int optional min=1 max default=1
functionId "66787d8f694aa083bbdf9aa9" string optional mongodb

Example Request

Empty body

Example Response

{
    "pageCount": 2,
    "pageSize": 3,
    "totalCount": 22,
    "results": [
        {
            "id": "666db024694aa083bbdf9aa5",
            "functionId": "666da32e84809f8a29ddc2e0",
            "status": "SUCCESS",
            "createdAt": "2024-06-15T15:15:48Z"
        },
        {
            "id": "666daec1694aa083bbdf9aa4",
            "functionId": "666dae5984809f8a29ddc2e1",
            "status": "SUCCESS",
            "createdAt": "2024-06-15T15:09:53Z"
        },
        {
            "id": "666d6cb4694aa083bbdf9aa0",
            "functionId": "666c271e84809f8a29ddc2d4",
            "status": "FAILED",
            "createdAt": "2024-06-15T10:28:04Z"
        }
    ]
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.