2023-05-17 22:47:58 +01:00
|
|
|
# API Docs
|
|
|
|
|
|
|
|
**Description:** Interacts with projects
|
|
|
|
|
|
|
|
**Version:** `v0`
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h2 id='list-of-endpoints'>List of Endpoints</h2>
|
|
|
|
|
2023-08-23 18:21:54 +01:00
|
|
|
* ProjectManagement
|
2023-08-24 16:12:27 +01:00
|
|
|
* [Create new Project](#projectmanagement-create-new-project)
|
|
|
|
* [Update Project](#projectmanagement-update-project)
|
|
|
|
* [Delete Project](#projectmanagement-delete-project)
|
|
|
|
* [Get Projects](#projectmanagement-get-projects)
|
|
|
|
* [Get Project's Single Bucket Usage](#projectmanagement-get-projects-single-bucket-usage)
|
|
|
|
* [Get Project's All Buckets Usage](#projectmanagement-get-projects-all-buckets-usage)
|
|
|
|
* [Get Project's API Keys](#projectmanagement-get-projects-api-keys)
|
2023-08-23 18:21:54 +01:00
|
|
|
* APIKeyManagement
|
2023-08-24 16:12:27 +01:00
|
|
|
* [Create new macaroon API key](#apikeymanagement-create-new-macaroon-api-key)
|
|
|
|
* [Delete API Key](#apikeymanagement-delete-api-key)
|
2023-08-23 18:21:54 +01:00
|
|
|
* UserManagement
|
2023-08-24 16:12:27 +01:00
|
|
|
* [Get User](#usermanagement-get-user)
|
2023-08-23 18:21:54 +01:00
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='projectmanagement-create-new-project'>Create new Project (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Creates new Project with given info
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`POST /api/v0/projects/create`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Request body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
{
|
|
|
|
name: string
|
|
|
|
description: string
|
2023-08-17 13:26:13 +01:00
|
|
|
storageLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
bandwidthLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
createdAt: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
2023-05-17 22:47:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-09-25 17:43:30 +01:00
|
|
|
{
|
|
|
|
id: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
publicId: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
userAgent: string
|
|
|
|
ownerId: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
rateLimit: number
|
|
|
|
burstLimit: number
|
|
|
|
maxBuckets: number
|
|
|
|
createdAt: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
|
|
|
memberCount: number
|
|
|
|
storageLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
bandwidthLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
userSpecifiedStorageLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
userSpecifiedBandwidthLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
segmentLimit: number
|
|
|
|
defaultPlacement: number
|
|
|
|
}
|
|
|
|
|
2023-05-17 22:47:58 +01:00
|
|
|
```
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='projectmanagement-update-project'>Update Project (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Updates project with given info
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`PATCH /api/v0/projects/update/{id}`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Path Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `id` | `string` | UUID formatted as `00000000-0000-0000-0000-000000000000` |
|
|
|
|
|
|
|
|
**Request body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
{
|
|
|
|
name: string
|
|
|
|
description: string
|
2023-08-17 13:26:13 +01:00
|
|
|
storageLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
bandwidthLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
createdAt: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
2023-05-17 22:47:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
{
|
2023-08-17 13:26:13 +01:00
|
|
|
id: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
publicId: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
2023-05-17 22:47:58 +01:00
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
userAgent: string
|
2023-08-17 13:26:13 +01:00
|
|
|
ownerId: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
2023-05-17 22:47:58 +01:00
|
|
|
rateLimit: number
|
|
|
|
burstLimit: number
|
|
|
|
maxBuckets: number
|
2023-08-17 13:26:13 +01:00
|
|
|
createdAt: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
2023-05-17 22:47:58 +01:00
|
|
|
memberCount: number
|
2023-08-17 13:26:13 +01:00
|
|
|
storageLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
bandwidthLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
userSpecifiedStorageLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
userSpecifiedBandwidthLimit: string // Amount of memory formatted as `15 GB`
|
2023-05-17 22:47:58 +01:00
|
|
|
segmentLimit: number
|
|
|
|
defaultPlacement: number
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='projectmanagement-delete-project'>Delete Project (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Deletes project by id
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`DELETE /api/v0/projects/delete/{id}`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Path Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `id` | `string` | UUID formatted as `00000000-0000-0000-0000-000000000000` |
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='projectmanagement-get-projects'>Get Projects (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Gets all projects user has
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`GET /api/v0/projects/`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
[
|
|
|
|
{
|
2023-08-17 13:26:13 +01:00
|
|
|
id: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
publicId: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
2023-05-17 22:47:58 +01:00
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
userAgent: string
|
2023-08-17 13:26:13 +01:00
|
|
|
ownerId: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
2023-05-17 22:47:58 +01:00
|
|
|
rateLimit: number
|
|
|
|
burstLimit: number
|
|
|
|
maxBuckets: number
|
2023-08-17 13:26:13 +01:00
|
|
|
createdAt: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
2023-05-17 22:47:58 +01:00
|
|
|
memberCount: number
|
2023-08-17 13:26:13 +01:00
|
|
|
storageLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
bandwidthLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
userSpecifiedStorageLimit: string // Amount of memory formatted as `15 GB`
|
|
|
|
userSpecifiedBandwidthLimit: string // Amount of memory formatted as `15 GB`
|
2023-05-17 22:47:58 +01:00
|
|
|
segmentLimit: number
|
|
|
|
defaultPlacement: number
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='projectmanagement-get-projects-single-bucket-usage'>Get Project's Single Bucket Usage (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Gets project's single bucket usage by bucket ID
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`GET /api/v0/projects/bucket-rollup`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Query Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `projectID` | `string` | UUID formatted as `00000000-0000-0000-0000-000000000000` |
|
|
|
|
| `bucket` | `string` | |
|
|
|
|
| `since` | `string` | Date timestamp formatted as `2006-01-02T15:00:00Z` |
|
|
|
|
| `before` | `string` | Date timestamp formatted as `2006-01-02T15:00:00Z` |
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
{
|
2023-08-17 13:26:13 +01:00
|
|
|
projectID: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
2023-05-17 22:47:58 +01:00
|
|
|
bucketName: string
|
|
|
|
totalStoredData: number
|
|
|
|
totalSegments: number
|
|
|
|
objectCount: number
|
|
|
|
metadataSize: number
|
|
|
|
repairEgress: number
|
|
|
|
getEgress: number
|
|
|
|
auditEgress: number
|
2023-08-17 13:26:13 +01:00
|
|
|
since: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
|
|
|
before: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
2023-05-17 22:47:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='projectmanagement-get-projects-all-buckets-usage'>Get Project's All Buckets Usage (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Gets project's all buckets usage
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`GET /api/v0/projects/bucket-rollups`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Query Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `projectID` | `string` | UUID formatted as `00000000-0000-0000-0000-000000000000` |
|
|
|
|
| `since` | `string` | Date timestamp formatted as `2006-01-02T15:00:00Z` |
|
|
|
|
| `before` | `string` | Date timestamp formatted as `2006-01-02T15:00:00Z` |
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
[
|
|
|
|
{
|
2023-08-17 13:26:13 +01:00
|
|
|
projectID: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
2023-05-17 22:47:58 +01:00
|
|
|
bucketName: string
|
|
|
|
totalStoredData: number
|
|
|
|
totalSegments: number
|
|
|
|
objectCount: number
|
|
|
|
metadataSize: number
|
|
|
|
repairEgress: number
|
|
|
|
getEgress: number
|
|
|
|
auditEgress: number
|
2023-08-17 13:26:13 +01:00
|
|
|
since: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
|
|
|
before: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
2023-05-17 22:47:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='projectmanagement-get-projects-api-keys'>Get Project's API Keys (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Gets API keys by project ID
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`GET /api/v0/projects/apikeys/{projectID}`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Query Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `search` | `string` | |
|
|
|
|
| `limit` | `number` | |
|
|
|
|
| `page` | `number` | |
|
|
|
|
| `order` | `number` | |
|
|
|
|
| `orderDirection` | `number` | |
|
|
|
|
|
|
|
|
**Path Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `projectID` | `string` | UUID formatted as `00000000-0000-0000-0000-000000000000` |
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
{
|
|
|
|
apiKeys: [
|
|
|
|
{
|
2023-08-17 13:26:13 +01:00
|
|
|
id: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
projectId: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
projectPublicId: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
2023-05-17 22:47:58 +01:00
|
|
|
userAgent: string
|
|
|
|
name: string
|
2023-08-17 13:26:13 +01:00
|
|
|
createdAt: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
2023-05-17 22:47:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
search: string
|
|
|
|
limit: number
|
|
|
|
order: number
|
|
|
|
orderDirection: number
|
|
|
|
offset: number
|
|
|
|
pageCount: number
|
|
|
|
currentPage: number
|
|
|
|
totalCount: number
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='apikeymanagement-create-new-macaroon-api-key'>Create new macaroon API key (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Creates new macaroon API key with given info
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`POST /api/v0/apikeys/create`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Request body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
{
|
|
|
|
projectID: string
|
|
|
|
name: string
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
{
|
|
|
|
key: string
|
|
|
|
keyInfo: unknown
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='apikeymanagement-delete-api-key'>Delete API Key (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Deletes macaroon API key by id
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`DELETE /api/v0/apikeys/delete/{id}`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Path Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `id` | `string` | UUID formatted as `00000000-0000-0000-0000-000000000000` |
|
|
|
|
|
2023-08-24 16:12:27 +01:00
|
|
|
<h3 id='usermanagement-get-user'>Get User (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
Gets User by request context
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
`GET /api/v0/users/`
|
2023-05-17 22:47:58 +01:00
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
2023-08-17 13:26:13 +01:00
|
|
|
```typescript
|
2023-05-17 22:47:58 +01:00
|
|
|
{
|
2023-08-17 13:26:13 +01:00
|
|
|
id: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
2023-05-17 22:47:58 +01:00
|
|
|
fullName: string
|
|
|
|
shortName: string
|
|
|
|
email: string
|
|
|
|
userAgent: string
|
|
|
|
projectLimit: number
|
|
|
|
isProfessional: boolean
|
|
|
|
position: string
|
|
|
|
companyName: string
|
|
|
|
employeeCount: string
|
|
|
|
haveSalesContact: boolean
|
|
|
|
paidTier: boolean
|
|
|
|
isMFAEnabled: boolean
|
|
|
|
mfaRecoveryCodeCount: number
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|