Skip to content

Latest commit

 

History

History
353 lines (267 loc) · 9.18 KB

apidocs.gen.md

File metadata and controls

353 lines (267 loc) · 9.18 KB

API Docs

Description: Interacts with projects

Version: v1

List of Endpoints

Create new Project (go to full list)

Creates new Project with given info

POST /public/v1/projects/create

Request body:

{
	name: string
	description: string
	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`
}

Response body:

{
	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
	defaultVersioning: number
}

Update Project (go to full list)

Updates project with given info

PATCH /public/v1/projects/update/{id}

Path Params:

name type elaboration
id string UUID formatted as 00000000-0000-0000-0000-000000000000

Request body:

{
	name: string
	description: string
	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`
}

Response body:

{
	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
	defaultVersioning: number
}

Delete Project (go to full list)

Deletes project by id

DELETE /public/v1/projects/delete/{id}

Path Params:

name type elaboration
id string UUID formatted as 00000000-0000-0000-0000-000000000000

Get Projects (go to full list)

Gets all projects user has

GET /public/v1/projects/

Response body:

[
	{
		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
		defaultVersioning: number
	}

]

Get Project's Single Bucket Usage (go to full list)

Gets project's single bucket usage by bucket ID

GET /public/v1/projects/bucket-rollup

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:

{
	projectID: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
	bucketName: string
	totalStoredData: number
	totalSegments: number
	objectCount: number
	metadataSize: number
	repairEgress: number
	getEgress: number
	auditEgress: number
	since: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
	before: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
}

Get Project's All Buckets Usage (go to full list)

Gets project's all buckets usage

GET /public/v1/projects/bucket-rollups

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:

[
	{
		projectID: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
		bucketName: string
		totalStoredData: number
		totalSegments: number
		objectCount: number
		metadataSize: number
		repairEgress: number
		getEgress: number
		auditEgress: number
		since: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
		before: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
	}

]

Get Project's API Keys (go to full list)

Gets API keys by project ID

GET /public/v1/projects/apikeys/{projectID}

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:

{
	apiKeys: 	[
		{
			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`
			createdBy: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
			userAgent: 			string
			name: string
			createdAt: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
			version: number
		}

	]

	search: string
	limit: number
	order: number
	orderDirection: number
	offset: number
	pageCount: number
	currentPage: number
	totalCount: number
}

Create new macaroon API key (go to full list)

Creates new macaroon API key with given info

POST /public/v1/apikeys/create

Request body:

{
	projectID: string
	name: string
}

Response body:

{
	key: string
	keyInfo: unknown
}

Delete API Key (go to full list)

Deletes macaroon API key by id

DELETE /public/v1/apikeys/delete/{id}

Path Params:

name type elaboration
id string UUID formatted as 00000000-0000-0000-0000-000000000000

Get User (go to full list)

Gets User by request context

GET /public/v1/users/

Response body:

{
	id: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
	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
}