30 endpoints at https://api.vaif.studio, generated from the API's OpenAPI document. The REST API page covers authentication, and All endpoints lists every group.
GET /mongodb/collections
Response 200 (application/json)
{
name: string;
type?: string;
}[]
POST /mongodb/collections
Request body (application/json)
{
name: string;
options?: {
capped?: boolean;
size?: number;
max?: number;
validator?: { [key: string]: any };
validationLevel?: "moderate" | "off" | "strict";
validationAction?: "error" | "warn";
};
}
Response 200 (application/json)
{
ok: boolean;
collection: string;
}
DELETE /mongodb/collections/{name}
| Parameter | In | Type | Required |
|---|
name | path | string | Yes |
Response 200 (application/json)
{
ok: boolean;
}
POST /mongodb/collections/{name}/rename
| Parameter | In | Type | Required |
|---|
name | path | string | Yes |
Request body (application/json)
{
newName: string;
}
Response 200 (application/json)
{
ok: boolean;
oldName: string;
newName: string;
}
POST /mongodb/command
Response 200 (application/json)
{
[key: string]: null | boolean | number | string | JsonValue[] | {
[key: string]: JsonValue;
};
}
POST /mongodb/{collection}/find
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter?: { [key: string]: any };
options?: {
projection?: { [key: string]: any };
sort?: any[][] | { [key: string]: any };
skip?: number;
limit?: number;
hint?: { [key: string]: any } | string;
};
}
Response 200 (application/json)
{
[key: string]: null | boolean | number | string | JsonValue[] | {
[key: string]: JsonValue;
};
}[]
POST /mongodb/{collection}/find/cursor
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter?: { [key: string]: any };
options?: {
projection?: { [key: string]: any };
sort?: any[][] | { [key: string]: any };
skip?: number;
limit?: number;
hint?: { [key: string]: any } | string;
};
batchSize?: number;
}
Response 200 (application/json)
{
cursorId: string;
batch: { [key: string]: any }[];
exhausted: boolean;
}
POST /mongodb/{collection}/findOne
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter?: { [key: string]: any };
options?: {
projection?: { [key: string]: any };
sort?: any[][] | { [key: string]: any };
hint?: { [key: string]: any } | string;
};
}
Response 200 (application/json)
{
[key: string]: null | boolean | number | string | JsonValue[] | {
[key: string]: JsonValue;
};
} | null
GET /mongodb/{collection}/findById/{id}
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
id | path | string | Yes |
Response 200 (application/json)
{
[key: string]: null | boolean | number | string | JsonValue[] | {
[key: string]: JsonValue;
};
}
POST /mongodb/{collection}/count
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter?: { [key: string]: any };
}
Response 200 (application/json)
{
count: number;
}
GET /mongodb/{collection}/estimatedCount
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Response 200 (application/json)
{
count: number;
}
POST /mongodb/{collection}/distinct
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
field: string;
filter?: { [key: string]: any };
}
Response 200 (application/json)
(null | boolean | number | string | JsonValue[] | {
[key: string]: JsonValue;
})[]
POST /mongodb/{collection}/insertOne
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
document: { [key: string]: any };
}
Response 200 (application/json)
{
acknowledged: boolean;
insertedId: string;
}
POST /mongodb/{collection}/insertMany
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
documents: { [key: string]: any }[];
options?: {
ordered?: boolean;
};
}
Response 200 (application/json)
{
acknowledged: boolean;
insertedCount: number;
insertedIds: string[];
}
POST /mongodb/{collection}/updateOne
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter: { [key: string]: any };
update: { [key: string]: any };
options?: {
upsert?: boolean;
arrayFilters?: { [key: string]: any }[];
hint?: { [key: string]: any } | string;
};
}
Response 200 (application/json)
{
acknowledged: boolean;
matchedCount: number;
modifiedCount: number;
upsertedId?: string;
upsertedCount: number;
}
POST /mongodb/{collection}/updateMany
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter: { [key: string]: any };
update: { [key: string]: any };
options?: {
upsert?: boolean;
arrayFilters?: { [key: string]: any }[];
hint?: { [key: string]: any } | string;
};
}
Response 200 (application/json)
{
acknowledged: boolean;
matchedCount: number;
modifiedCount: number;
upsertedId?: string;
upsertedCount: number;
}
POST /mongodb/{collection}/replaceOne
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter: { [key: string]: any };
replacement: { [key: string]: any };
options?: {
upsert?: boolean;
hint?: { [key: string]: any } | string;
};
}
Response 200 (application/json)
{
acknowledged: boolean;
matchedCount: number;
modifiedCount: number;
upsertedId?: string;
upsertedCount: number;
}
POST /mongodb/{collection}/findOneAndUpdate
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter: { [key: string]: any };
update: { [key: string]: any };
options?: {
upsert?: boolean;
returnDocument?: "after" | "before";
projection?: { [key: string]: any };
sort?: any[][] | { [key: string]: any };
arrayFilters?: { [key: string]: any }[];
};
}
Response 200 (application/json)
{
value: null | {
_id: {
_bsontype: "ObjectId";
id: {
BYTES_PER_ELEMENT: number;
buffer: any;
byteLength: number;
byteOffset: number;
length: number;
};
};
};
ok: number;
}
POST /mongodb/{collection}/findOneAndReplace
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter: { [key: string]: any };
replacement: { [key: string]: any };
options?: {
upsert?: boolean;
returnDocument?: "after" | "before";
projection?: { [key: string]: any };
sort?: any[][] | { [key: string]: any };
};
}
Response 200 (application/json)
{
value: null | {
_id: {
_bsontype: "ObjectId";
id: {
BYTES_PER_ELEMENT: number;
buffer: any;
byteLength: number;
byteOffset: number;
length: number;
};
};
};
ok: number;
}
POST /mongodb/{collection}/deleteOne
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter: { [key: string]: any };
}
Response 200 (application/json)
{
acknowledged: boolean;
deletedCount: number;
}
POST /mongodb/{collection}/deleteMany
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter: { [key: string]: any };
}
Response 200 (application/json)
{
acknowledged: boolean;
deletedCount: number;
}
POST /mongodb/{collection}/findOneAndDelete
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
filter: { [key: string]: any };
options?: {
projection?: { [key: string]: any };
sort?: any[][] | { [key: string]: any };
};
}
Response 200 (application/json)
{
value: null | {
_id: {
_bsontype: "ObjectId";
id: {
BYTES_PER_ELEMENT: number;
buffer: any;
byteLength: number;
byteOffset: number;
length: number;
};
};
};
ok: number;
}
POST /mongodb/{collection}/aggregate
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
pipeline: { [key: string]: any }[];
options?: {
allowDiskUse?: boolean;
maxTimeMS?: number;
hint?: { [key: string]: any } | string;
comment?: string;
};
}
Response 200 (application/json)
{
[key: string]: null | boolean | number | string | JsonValue[] | {
[key: string]: JsonValue;
};
}[]
POST /mongodb/{collection}/aggregate/cursor
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
pipeline: { [key: string]: any }[];
options?: {
allowDiskUse?: boolean;
maxTimeMS?: number;
hint?: { [key: string]: any } | string;
comment?: string;
};
batchSize?: number;
}
Response 200 (application/json)
{
cursorId: string;
batch: { [key: string]: any }[];
exhausted: boolean;
}
GET /mongodb/{collection}/indexes
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Response 200 (application/json)
{
name: any;
key: any;
unique: any;
sparse: any;
}[]
POST /mongodb/{collection}/indexes
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
keys: any[][] | { [key: string]: any } | string;
options?: {
unique?: boolean;
sparse?: boolean;
background?: boolean;
name?: string;
expireAfterSeconds?: number;
partialFilterExpression?: { [key: string]: any };
};
}
Response 200 (application/json)
{
indexName: string;
}
DELETE /mongodb/{collection}/indexes/{indexName}
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
indexName | path | string | Yes |
Response 200 (application/json)
{
ok: boolean;
}
POST /mongodb/{collection}/bulkWrite
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
Request body (application/json)
{
operations: {
insertOne?: {
document: { [key: string]: any };
};
updateOne?: {
filter: { [key: string]: any };
update: { [key: string]: any };
upsert?: any;
};
updateMany?: {
filter: { [key: string]: any };
update: { [key: string]: any };
upsert?: any;
};
replaceOne?: {
filter: { [key: string]: any };
replacement: { [key: string]: any };
upsert?: any;
};
deleteOne?: {
filter: { [key: string]: any };
};
deleteMany?: {
filter: { [key: string]: any };
};
}[];
options?: {
ordered?: boolean;
};
}
Response 200 (application/json)
{
insertedCount: number;
matchedCount: number;
modifiedCount: number;
deletedCount: number;
upsertedCount: number;
upsertedIds: { [key: string]: any };
}
POST /mongodb/{collection}/cursor/{cursorId}/next
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
cursorId | path | string | Yes |
Response 200 (application/json)
{
batch: { [key: string]: any }[];
exhausted: boolean;
}
POST /mongodb/{collection}/cursor/{cursorId}/close
| Parameter | In | Type | Required |
|---|
collection | path | string | Yes |
cursorId | path | string | Yes |
Response 200 (application/json)
{
ok: boolean;
}