Skip to main content

Function API Endpoints

1. Create Function Endpoint

  • Method: POST

  • Parameters:

    • functionName: Name of the function.
    • sdkVersion: SDK version used by the function (e.g., 0.45.3).
    • templateLanguageTag: Code template (e.g., Qiskit, CUDA).
    • description: Optional description of the function.
  • Response:

    Success: Returns 200 OK status and details of the created function, including:

    • functionId: Unique identifier of the function.

    • functionName: SDK version used by the function (e.g., 0.45.3).

    • templateLanguageTag: Code template (e.g., Qiskit, CUDA).

    • description: Optional description of the function.

    • templateFiles: List of template files used to initialize the function, including: filename, language, content.

    • functionVersion: Optional description of the function.

      • id: Function version ID.
      • version: Version number.
      • inDeployed: Deployment status.
      • createdDate: Creation timestamp.
      • files: Uploaded files with storage metadata (id, versionId, key, size, status)

2. Create Function Version

  • Method: POST

  • Parameters:

    • functionId: Unique identifier of the function.
    • description: Optional description of the function version.
    • templateFiles: List of template files included in the function version, including:filename, language, fileId, content
  • Response:

    Success: Returns 200 OK status and details of the created function version, including:

    • timestamp: Response timestamp.

    • route: API endpoint that processed the request.

    • data: Function version information, including:

      • id: Function version ID.
      • version: Version number.
      • inDeployed: Deployment status.
      • createdDate: Creation timestamp.
      • files: Uploaded files with storage metadata (id, versionId, key, size, status)

3. View Function Details Endpoint

  • Method: GET

  • Parameters:

    • function_id: ID of the function to view.
  • Response:

    • Success: Returns 200 OK status and function details, including name, sdk, sdkVersion, sources, version, versionList, status, deployment information, and logs.

4. Delete Function Endpoint

  • Method: DELETE

  • Parameters:

    • function_id: ID of the function to delete.
  • Response:

    • Success: Returns 200 OK status to confirm deletion.