Skip to main content
POST
/
api
/
v1
/
functions
/
{function_id}
/
invoke
Invoke
package main

import(
	"context"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := conductoronesdkgo.New(
        conductoronesdkgo.WithSecurity(shared.Security{
            BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
            Oauth: "<YOUR_OAUTH_HERE>",
        }),
    )

    res, err := s.Functions.Invoke(ctx, operations.C1APIFunctionsV1FunctionsServiceInvokeRequest{
        FunctionID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.FunctionsServiceInvokeResponse != nil {
        // handle response
    }
}
{
  "invocationId": "<string>",
  "json": "aSDinaTvuI8gbWludGxpZnk="
}

Documentation Index

Fetch the complete documentation index at: https://conductorone-ian-account-to-user-pipeline.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Path Parameters

function_id
string
required

The ID of the function to invoke.

Body

application/json

The FunctionsServiceInvokeRequest message.

This message contains a oneof named arg. Only a single field of the following list may be set at a time:

  • json
commitId
string

The commit ID specifying which version of the function code to run.

json
file | null

The JSON-encoded input data passed to the function. This field is part of the arg oneof. See the documentation for c1.api.functions.v1.FunctionsServiceInvokeRequest for more details.

vfsId
string

Optional VFS volume ID to attach to this invocation. If empty, VFS operations will error.

Response

200 - application/json

Successful response

The FunctionsServiceInvokeResponse message.

This message contains a oneof named resp. Only a single field of the following list may be set at a time:

  • json
invocationId
string

The ID of the created invocation, used to track execution status and retrieve results.

json
file | null
deprecated

Deprecated. The JSON-encoded output returned by the function. This field is part of the resp oneof. See the documentation for c1.api.functions.v1.FunctionsServiceInvokeResponse for more details.