Storage API specification (c55baf4309575d34546c1967b2cc3bccae2fbe65)

Download OpenAPI specification:Download

The storage service implements all storage functions for GroupAlarm

buckets

GetBuckets

Get a list of buckets for an organization

Authorizations:
API_TokenPersonal-Access-Token
query Parameters
organization_id
required
integer

id of organization to query buckets for

Responses

Response samples

Content type
application/json
[
  • {
    }
]

CreateBucket

Creates a new storage bucket with the passed properties

Authorizations:
API_TokenPersonal-Access-Token
Request Body schema: application/json
required

bucket to create

description
string
id
integer <int64>
name
string
organizationID
integer <int64>
readOnlyUserIDs
Array of integers <int64> [ items <int64 > ]
readWriteUserIDs
Array of integers <int64> [ items <int64 > ]
sizeLimit
integer <int64>

SizeLimit is the maximum number of bytes that can be contained in the bucket

spaceUsed
integer <int64>

SpaceUsed is the number of bytes contained in the bucket

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "id": 0,
  • "name": "string",
  • "organizationID": 0,
  • "readOnlyUserIDs": [
    ],
  • "readWriteUserIDs": [
    ],
  • "sizeLimit": 0,
  • "spaceUsed": 0
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "id": 0,
  • "name": "string",
  • "organizationID": 0,
  • "readOnlyUserIDs": [
    ],
  • "readWriteUserIDs": [
    ],
  • "sizeLimit": 0,
  • "spaceUsed": 0
}

GetBucket

Get a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of a bucket

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "id": 0,
  • "name": "string",
  • "organizationID": 0,
  • "readOnlyUserIDs": [
    ],
  • "readWriteUserIDs": [
    ],
  • "sizeLimit": 0,
  • "spaceUsed": 0
}

UpdateBucket

Update a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of a bucket

Request Body schema: application/json
required
description
string
id
integer <int64>
name
string
organizationID
integer <int64>
readOnlyUserIDs
Array of integers <int64> [ items <int64 > ]
readWriteUserIDs
Array of integers <int64> [ items <int64 > ]
sizeLimit
integer <int64>

SizeLimit is the maximum number of bytes that can be contained in the bucket

spaceUsed
integer <int64>

SpaceUsed is the number of bytes contained in the bucket

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "id": 0,
  • "name": "string",
  • "organizationID": 0,
  • "readOnlyUserIDs": [
    ],
  • "readWriteUserIDs": [
    ],
  • "sizeLimit": 0,
  • "spaceUsed": 0
}

Response samples

Content type
application/json
{
  • "description": "string",
  • "id": 0,
  • "name": "string",
  • "organizationID": 0,
  • "readOnlyUserIDs": [
    ],
  • "readWriteUserIDs": [
    ],
  • "sizeLimit": 0,
  • "spaceUsed": 0
}

DeleteBucket

Delete a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of a bucket

Responses

Response samples

Content type
application/json
{
  • "description": "string",
  • "id": 0,
  • "name": "string",
  • "organizationID": 0,
  • "readOnlyUserIDs": [
    ],
  • "readWriteUserIDs": [
    ],
  • "sizeLimit": 0,
  • "spaceUsed": 0
}

GetContentsOfBucket

Get contents of a folder in a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of bucket to query

query Parameters
folder
integer

id of folder to query, if not present, query root folder in bucket

Responses

Response samples

Content type
application/json
{
  • "files": [
    ],
  • "folders": [
    ],
  • "path": [
    ]
}

files

GetFilesInBucket

Get a list of files in a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of bucket to query files for

Responses

Response samples

Content type
application/json
[
  • {
    }
]

UploadFile

Upload a file to a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of bucket to query files for

query Parameters
filekey_id
integer

ids of the filekeys the file should be associated with

folder
integer

the id of the folder to add the file into, if this is not present, puts the file in the root folder

Responses

GetFile

Get a file from a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of bucket to query files for

file
required
integer

id of file to get from bucket

Responses

Response samples

Content type
application/json
{
  • "bucketID": 0,
  • "contentType": "string",
  • "creatorID": 0,
  • "creatorName": "string",
  • "creatorType": "string",
  • "fileKeyIDs": [
    ],
  • "folderID": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uploadedAt": null
}

UpdateFile

Update a file of a bucket for its name and the given file keys

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
file
required
integer

id of file that gets updated

bucket
required
integer

id of bucket to query files for

query Parameters
filekey_id
integer

ids of the filekeys the file should be associated with

Request Body schema: application/json
required
bucketID
integer <int64>
contentType
string
creatorID
integer <int64>
creatorName
string
creatorType
string
fileKeyIDs
Array of integers <int64> [ items <int64 > ]
folderID
integer <int64>
id
integer <int64>
name
string
size
integer <int64>
uploadedAt
any

Responses

Request samples

Content type
application/json
{
  • "bucketID": 0,
  • "contentType": "string",
  • "creatorID": 0,
  • "creatorName": "string",
  • "creatorType": "string",
  • "fileKeyIDs": [
    ],
  • "folderID": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uploadedAt": null
}

Response samples

Content type
application/json
{
  • "bucketID": 0,
  • "contentType": "string",
  • "creatorID": 0,
  • "creatorName": "string",
  • "creatorType": "string",
  • "fileKeyIDs": [
    ],
  • "folderID": 0,
  • "id": 0,
  • "name": "string",
  • "size": 0,
  • "uploadedAt": null
}

DeleteFile

Delete a file from a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of a bucket

file
required
integer

id of file to get from bucket

Responses

DownloadFile

Download a file from a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of bucket to query files for

file
required
integer

id of file to get from bucket

Responses

GetFilesForFileKey

Get files for file keys

Authorizations:
API_TokenPersonal-Access-Token
query Parameters
organization_id
required
integer

id of organization

filekey_id
integer

ids of the filekeys the file should be associated with

filekey_name
string

names of the filekeys the file should be associated with

Responses

Response samples

Content type
application/json
[
  • {
    }
]

folders

CreateFolder

Create a folder in a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of a bucket

Request Body schema: application/json
required

folder to create

bucketID
integer <int64>
id
integer <int64>
name
string
parentID
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "bucketID": 0,
  • "id": 0,
  • "name": "string",
  • "parentID": 0
}

UpdateFolder

Rename and/or move a folder

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of a bucket

folderID
required
integer

id of the folder to update

Request Body schema: application/json
required

the new folder description

bucketID
integer <int64>
id
integer <int64>
name
string
parentID
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "bucketID": 0,
  • "id": 0,
  • "name": "string",
  • "parentID": 0
}

Get a folder and its ancestors excluding the root by folder id.

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of a bucket

folder
required
integer

id of a folder

Responses

Response samples

Content type
application/json
[
  • {
    }
]

DeleteFolder

Delete a folder in a bucket

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
bucket
required
integer

id of a bucket

folder
required
integer

the id of the folder to delete

Responses

fileKey

GetFileKeys

Get a list of fileKeys for an organization or for a list of fileKey ids

Authorizations:
API_TokenPersonal-Access-Token
query Parameters
organization_id
required
integer

id of organization to query buckets for

filekey_id
integer

ids of the filekeys that sould be returned

filekey_name
integer

name of the filekey that sould be returned

Responses

Response samples

Content type
application/json
[
  • {
    }
]

CreateFileKey

Creates a new file key

Authorizations:
API_TokenPersonal-Access-Token
Request Body schema: application/json
required

file key to create

id
integer <int64>
name
string
organizationID
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "organizationID": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "organizationID": 0
}

GetFileKey

Get a fileKey

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
filekey
required
integer

id of a fileKey

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "organizationID": 0
}

DeleteFileKey

Delete a fileKey

Authorizations:
API_TokenPersonal-Access-Token
path Parameters
filekey
required
integer

id of a fileKey

Responses