All URIs are relative to https://api.openai.com/v1
Method | HTTP request | Description |
---|---|---|
deleteInvite | DELETE /organization/invites/{invite_id} | Delete an invite. If the invite has already been accepted, it cannot be deleted. |
inviteUser | POST /organization/invites | Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization. |
listInvites | GET /organization/invites | Returns a list of invites in the organization. |
retrieveInvite | GET /organization/invites/{invite_id} | Retrieves an invite. |
InviteDeleteResponse deleteInvite(inviteId)
Delete an invite. If the invite has already been accepted, it cannot be deleted.
// Import classes:
import com.github.ainoya.client.ApiClient;
import com.github.ainoya.client.ApiException;
import com.github.ainoya.client.Configuration;
import com.github.ainoya.client.auth.*;
import com.github.ainoya.client.models.*;
import com.github.ainoya.openai.client.api.InvitesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.openai.com/v1");
// Configure HTTP bearer authorization: ApiKeyAuth
HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setBearerToken("BEARER TOKEN");
InvitesApi apiInstance = new InvitesApi(defaultClient);
String inviteId = "inviteId_example"; // String | The ID of the invite to delete.
try {
InviteDeleteResponse result = apiInstance.deleteInvite(inviteId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InvitesApi#deleteInvite");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
inviteId | String | The ID of the invite to delete. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Invite deleted successfully. | - |
Invite inviteUser(inviteRequest)
Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
// Import classes:
import com.github.ainoya.client.ApiClient;
import com.github.ainoya.client.ApiException;
import com.github.ainoya.client.Configuration;
import com.github.ainoya.client.auth.*;
import com.github.ainoya.client.models.*;
import com.github.ainoya.openai.client.api.InvitesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.openai.com/v1");
// Configure HTTP bearer authorization: ApiKeyAuth
HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setBearerToken("BEARER TOKEN");
InvitesApi apiInstance = new InvitesApi(defaultClient);
InviteRequest inviteRequest = new InviteRequest(); // InviteRequest | The invite request payload.
try {
Invite result = apiInstance.inviteUser(inviteRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InvitesApi#inviteUser");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
inviteRequest | InviteRequest | The invite request payload. |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | User invited successfully. | - |
InviteListResponse listInvites(limit, after)
Returns a list of invites in the organization.
// Import classes:
import com.github.ainoya.client.ApiClient;
import com.github.ainoya.client.ApiException;
import com.github.ainoya.client.Configuration;
import com.github.ainoya.client.auth.*;
import com.github.ainoya.client.models.*;
import com.github.ainoya.openai.client.api.InvitesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.openai.com/v1");
// Configure HTTP bearer authorization: ApiKeyAuth
HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setBearerToken("BEARER TOKEN");
InvitesApi apiInstance = new InvitesApi(defaultClient);
Integer limit = 20; // Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
String after = "after_example"; // String | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
try {
InviteListResponse result = apiInstance.listInvites(limit, after);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InvitesApi#listInvites");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional] [default to 20] |
after | String | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Invites listed successfully. | - |
Invite retrieveInvite(inviteId)
Retrieves an invite.
// Import classes:
import com.github.ainoya.client.ApiClient;
import com.github.ainoya.client.ApiException;
import com.github.ainoya.client.Configuration;
import com.github.ainoya.client.auth.*;
import com.github.ainoya.client.models.*;
import com.github.ainoya.openai.client.api.InvitesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.openai.com/v1");
// Configure HTTP bearer authorization: ApiKeyAuth
HttpBearerAuth ApiKeyAuth = (HttpBearerAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setBearerToken("BEARER TOKEN");
InvitesApi apiInstance = new InvitesApi(defaultClient);
String inviteId = "inviteId_example"; // String | The ID of the invite to retrieve.
try {
Invite result = apiInstance.retrieveInvite(inviteId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InvitesApi#retrieveInvite");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
inviteId | String | The ID of the invite to retrieve. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Invite retrieved successfully. | - |