Python
from openlayer import Openlayer
client = Openlayer()
invites = client.workspaces.invites.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
print(invites.items)import Openlayer from 'openlayer';
const client = new Openlayer();
const invites = await client.workspaces.invites.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { page: 1, perPage: 25 });
console.log(invites.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
invites, err := client.Workspaces.Invites.List(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
openlayer.WorkspaceInviteListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", invites.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.workspaces.invites.InviteListParams;
import com.openlayer.api.models.workspaces.invites.InviteListResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
InviteListParams params = InviteListParams.builder()
.workspaceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.perPage(25L)
.build();
InviteListResponse invites = client.workspaces().invites().list(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
invites = openlayer.workspaces.invites.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(invites)
curl --request GET \
--url https://api.openlayer.com/v1/workspaces/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/invites \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"creator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "user123",
"name": "Rishab Ramanathan"
},
"status": "accepted",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Openlayer",
"slug": "openlayer",
"dateCreated": "2023-11-07T05:31:56Z",
"memberCount": 1
},
"email": "user@email.com",
"role": "ADMIN"
}
]
}{
"code": 123,
"error": "<string>"
}Invites and API keys
List invites
List the invites in a workspace.
Python
from openlayer import Openlayer
client = Openlayer()
invites = client.workspaces.invites.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
print(invites.items)import Openlayer from 'openlayer';
const client = new Openlayer();
const invites = await client.workspaces.invites.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { page: 1, perPage: 25 });
console.log(invites.items);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
invites, err := client.Workspaces.Invites.List(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
openlayer.WorkspaceInviteListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", invites.Items)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.workspaces.invites.InviteListParams;
import com.openlayer.api.models.workspaces.invites.InviteListResponse;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
InviteListParams params = InviteListParams.builder()
.workspaceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.perPage(25L)
.build();
InviteListResponse invites = client.workspaces().invites().list(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
invites = openlayer.workspaces.invites.list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(invites)
curl --request GET \
--url https://api.openlayer.com/v1/workspaces/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/invites \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"creator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "user123",
"name": "Rishab Ramanathan"
},
"status": "accepted",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Openlayer",
"slug": "openlayer",
"dateCreated": "2023-11-07T05:31:56Z",
"memberCount": 1
},
"email": "user@email.com",
"role": "ADMIN"
}
]
}{
"code": 123,
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.
Path Parameters
The workspace id.
Query Parameters
The page to return in a paginated query.
Required range:
x >= 1Maximum number of items to return per page.
Required range:
1 <= x <= 100Response
Status OK.
Show child attributes
Show child attributes
Was this page helpful?