@ory/client
Version:
OpenAPI client for @ory/client
465 lines (309 loc) • 12.9 kB
Markdown
All URIs are relative to *https://playground.projects.oryapis.com*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createWorkspace**](
|[**createWorkspaceApiKey**](
|[**deleteWorkspaceApiKey**](
|[**getWorkspace**](
|[**listWorkspaceApiKeys**](
|[**listWorkspaceProjects**](
|[**listWorkspaces**](
|[**updateWorkspace**](
> Workspace createWorkspace()
### Example
```typescript
import {
WorkspaceApi,
Configuration,
CreateWorkspaceBody
} from '@ory/client';
const configuration = new Configuration();
const apiInstance = new WorkspaceApi(configuration);
let createWorkspaceBody: CreateWorkspaceBody; // (optional)
const { status, data } = await apiInstance.createWorkspace(
createWorkspaceBody
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **createWorkspaceBody** | **CreateWorkspaceBody**| | |
**Workspace**
[](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | workspace | - |
|**400** | errorGeneric | - |
|**401** | errorGeneric | - |
|**403** | errorGeneric | - |
|**500** | errorGeneric | - |
|**0** | errorGeneric | - |
[[Back to top]](
> WorkspaceApiKey createWorkspaceApiKey()
Create an API key for a workspace.
### Example
```typescript
import {
WorkspaceApi,
Configuration,
CreateWorkspaceApiKeyBody
} from '@ory/client';
const configuration = new Configuration();
const apiInstance = new WorkspaceApi(configuration);
let workspace: string; //The Workspace ID (default to undefined)
let createWorkspaceApiKeyBody: CreateWorkspaceApiKeyBody; // (optional)
const { status, data } = await apiInstance.createWorkspaceApiKey(
workspace,
createWorkspaceApiKeyBody
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **createWorkspaceApiKeyBody** | **CreateWorkspaceApiKeyBody**| | |
| **workspace** | [**string**] | The Workspace ID | defaults to undefined|
**WorkspaceApiKey**
[](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | workspaceApiKey | - |
|**0** | errorGeneric | - |
[[Back to top]](
> deleteWorkspaceApiKey()
Deletes an API key and immediately removes it.
```typescript
import {
WorkspaceApi,
Configuration
} from '@ory/client';
const configuration = new Configuration();
const apiInstance = new WorkspaceApi(configuration);
let workspace: string; //The Workspace ID or Workspace slug (default to undefined)
let tokenId: string; //The Token ID (default to undefined)
const { status, data } = await apiInstance.deleteWorkspaceApiKey(
workspace,
tokenId
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **workspace** | [**string**] | The Workspace ID or Workspace slug | defaults to undefined|
| **tokenId** | [**string**] | The Token ID | defaults to undefined|
void (empty response body)
[](../README.md
- **Content-Type**: Not defined
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. | - |
|**0** | errorGeneric | - |
[[Back to top]](
> Workspace getWorkspace()
Any workspace member can access this endpoint.
### Example
```typescript
import {
WorkspaceApi,
Configuration
} from '@ory/client';
const configuration = new Configuration();
const apiInstance = new WorkspaceApi(configuration);
let workspace: string; // (default to undefined)
const { status, data } = await apiInstance.getWorkspace(
workspace
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **workspace** | [**string**] | | defaults to undefined|
**Workspace**
[](../README.md
- **Content-Type**: Not defined
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | workspace | - |
|**400** | errorGeneric | - |
|**401** | errorGeneric | - |
|**403** | errorGeneric | - |
|**500** | errorGeneric | - |
|**0** | errorGeneric | - |
[[Back to top]](
> Array<WorkspaceApiKey> listWorkspaceApiKeys()
A list of all the workspace\'s API keys.
### Example
```typescript
import {
WorkspaceApi,
Configuration
} from '@ory/client';
const configuration = new Configuration();
const apiInstance = new WorkspaceApi(configuration);
let workspace: string; //The Workspace ID or Workspace slug (default to undefined)
const { status, data } = await apiInstance.listWorkspaceApiKeys(
workspace
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **workspace** | [**string**] | The Workspace ID or Workspace slug | defaults to undefined|
**Array<WorkspaceApiKey>**
[](../README.md
- **Content-Type**: Not defined
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | workspaceApiKeys | - |
|**0** | errorGeneric | - |
[[Back to top]](
> ListWorkspaceProjects listWorkspaceProjects()
Any workspace member can access this endpoint.
### Example
```typescript
import {
WorkspaceApi,
Configuration
} from '@ory/client';
const configuration = new Configuration();
const apiInstance = new WorkspaceApi(configuration);
let workspace: string; // (default to undefined)
const { status, data } = await apiInstance.listWorkspaceProjects(
workspace
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **workspace** | [**string**] | | defaults to undefined|
**ListWorkspaceProjects**
[](../README.md
- **Content-Type**: Not defined
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | listWorkspaceProjects | - |
|**400** | errorGeneric | - |
|**401** | errorGeneric | - |
|**403** | errorGeneric | - |
|**500** | errorGeneric | - |
|**0** | errorGeneric | - |
[[Back to top]](
> ListWorkspaces listWorkspaces()
### Example
```typescript
import {
WorkspaceApi,
Configuration
} from '@ory/client';
const configuration = new Configuration();
const apiInstance = new WorkspaceApi(configuration);
let pageSize: number; //Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). (optional) (default to 250)
let pageToken: string; //Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). (optional) (default to undefined)
const { status, data } = await apiInstance.listWorkspaces(
pageSize,
pageToken
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **pageSize** | [**number**] | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). | (optional) defaults to 250|
| **pageToken** | [**string**] | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). | (optional) defaults to undefined|
**ListWorkspaces**
[](../README.md
- **Content-Type**: Not defined
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | listWorkspaces | - |
|**400** | errorGeneric | - |
|**401** | errorGeneric | - |
|**403** | errorGeneric | - |
|**500** | errorGeneric | - |
|**0** | errorGeneric | - |
[[Back to top]](
> Workspace updateWorkspace()
Workspace members with the role `OWNER` can access this endpoint.
### Example
```typescript
import {
WorkspaceApi,
Configuration,
UpdateWorkspaceBody
} from '@ory/client';
const configuration = new Configuration();
const apiInstance = new WorkspaceApi(configuration);
let workspace: string; // (default to undefined)
let updateWorkspaceBody: UpdateWorkspaceBody; // (optional)
const { status, data } = await apiInstance.updateWorkspace(
workspace,
updateWorkspaceBody
);
```
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **updateWorkspaceBody** | **UpdateWorkspaceBody**| | |
| **workspace** | [**string**] | | defaults to undefined|
**Workspace**
[](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | workspace | - |
|**400** | errorGeneric | - |
|**401** | errorGeneric | - |
|**403** | errorGeneric | - |
|**500** | errorGeneric | - |
|**0** | errorGeneric | - |
[[Back to top]](