Files

files

Operations about files

Find out more

updateNimbusFile

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('http://localhost:8080/api/v1/file', headers = headers)

print(r.json())

PUT /file

Update an existing file

Update an existing file by Id

Body parameter

{
  "createdAt": "2000-01-23T04:56:07.000Z",
  "fileName": "fileName",
  "metadata": {},
  "fileSize": 6,
  "fileURI": "fileURI",
  "id": 0
}

Parameters

Name
In
Type
Required
Description

body

body

File

true

Update an existent file in the store

Example responses

200 Response

{
  "createdAt": "2000-01-23T04:56:07.000Z",
  "fileName": "fileName",
  "metadata": {},
  "fileSize": 6,
  "fileURI": "fileURI",
  "id": 0
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

File

400

Invalid ID supplied

None

404

File not found

None

422

Validation exception

None

To perform this operation, you must be authenticated by means of one of the following methods: nimbus_auth ( Scopes: write:files read:files )

addNimbusFile

Code samples

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('http://localhost:8080/api/v1/file', headers = headers)

print(r.json())

POST /file

Add a new file to the store

Add a new file to the store

Body parameter

{
  "createdAt": "2000-01-23T04:56:07.000Z",
  "fileName": "fileName",
  "metadata": {},
  "fileSize": 6,
  "fileURI": "fileURI",
  "id": 0
}

Parameters

Name
In
Type
Required
Description

body

body

File

true

Create a new file in the store

Example responses

200 Response

{
  "createdAt": "2000-01-23T04:56:07.000Z",
  "fileName": "fileName",
  "metadata": {},
  "fileSize": 6,
  "fileURI": "fileURI",
  "id": 0
}

Responses

Status
Meaning
Description
Schema

200

Successful operation

File

400

Invalid input

None

422

Validation exception

None

To perform this operation, you must be authenticated by means of one of the following methods: nimbus_auth ( Scopes: write:files read:files )

findNimbusFilesByStatus

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('http://localhost:8080/api/v1/file/findByStatus', headers = headers)

print(r.json())

GET /file/findByStatus

Finds Files by status

Multiple status values can be provided with comma separated strings

Parameters

Name
In
Type
Required
Description

status

query

string

false

Status values that need to be considered for filter

Enumerated Values

Parameter
Value

status

available

status

pending

status

sold

Example responses

200 Response

[
  {
    "createdAt": "2000-01-23T04:56:07.000Z",
    "fileName": "fileName",
    "metadata": {},
    "fileSize": 6,
    "fileURI": "fileURI",
    "id": 0
  }
]

Responses

Status
Meaning
Description
Schema

200

successful operation

Inline

400

Invalid status value

None

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

anonymous

[File]

false

none

none

» id

integer

false

none

Unique id of the file object

» fileName

string

false

none

Name of file

» fileURI

string¦null

false

none

URI of the file

» fileSize

integer

false

none

Size of the file in bytes

» createdAt

string(date-time)

false

none

Time when the file object was created

» metadata

object¦null

false

none

Optional metadata associated with the file (JSON format)

To perform this operation, you must be authenticated by means of one of the following methods: nimbus_auth ( Scopes: write:files read:files )

findNimbusFilesByTags

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('http://localhost:8080/api/v1/file/findByTags', headers = headers)

print(r.json())

GET /file/findByTags

Finds Files by tags

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

Parameters

Name
In
Type
Required
Description

tags

query

array[string]

false

Tags to filter by

Example responses

200 Response

[
  {
    "createdAt": "2000-01-23T04:56:07.000Z",
    "fileName": "fileName",
    "metadata": {},
    "fileSize": 6,
    "fileURI": "fileURI",
    "id": 0
  }
]

Responses

Status
Meaning
Description
Schema

200

successful operation

Inline

400

Invalid tag value

None

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

anonymous

[File]

false

none

none

» id

integer

false

none

Unique id of the file object

» fileName

string

false

none

Name of file

» fileURI

string¦null

false

none

URI of the file

» fileSize

integer

false

none

Size of the file in bytes

» createdAt

string(date-time)

false

none

Time when the file object was created

» metadata

object¦null

false

none

Optional metadata associated with the file (JSON format)

To perform this operation, you must be authenticated by means of one of the following methods: nimbus_auth ( Scopes: write:files read:files )

getNimbusFileById

Code samples

import requests
headers = {
  'Accept': 'application/json',
  'api_key': 'API_KEY'
}

r = requests.get('http://localhost:8080/api/v1/file/{fileId}', headers = headers)

print(r.json())

GET /file/{fileId}

Find file by ID

Returns a single file

Parameters

Name
In
Type
Required
Description

fileId

path

integer(int64)

true

ID of file to return

Example responses

200 Response

{
  "createdAt": "2000-01-23T04:56:07.000Z",
  "fileName": "fileName",
  "metadata": {},
  "fileSize": 6,
  "fileURI": "fileURI",
  "id": 0
}

Responses

Status
Meaning
Description
Schema

200

successful operation

File

400

Invalid ID supplied

None

404

File not found

None

To perform this operation, you must be authenticated by means of one of the following methods: api_key, nimbus_auth ( Scopes: write:files read:files )

uploadNimbusbusFile

Code samples

import requests
headers = {
  'Content-Type': 'application/octet-stream',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('http://localhost:8080/api/v1/file/{fileId}/uploadImage', headers = headers)

print(r.json())

POST /file/{fileId}/uploadImage

uploads an image

Body parameter

string

Parameters

Name
In
Type
Required
Description

fileId

path

integer(int64)

true

ID of file to update

additionalMetadata

query

string

false

Additional Metadata

body

body

string(binary)

false

none

Example responses

200 Response

{
  "code": 0,
  "type": "type",
  "message": "message"
}

Responses

Status
Meaning
Description
Schema

200

successful operation

ApiResponse

To perform this operation, you must be authenticated by means of one of the following methods: nimbus_auth ( Scopes: write:files read:files )

file

updateNimbusFileWithForm

Code samples

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('http://localhost:8080/api/v1/file/{fileId}', headers = headers)

print(r.json())

POST /file/{fileId}

Updates a file in the store with form data

Parameters

Name
In
Type
Required
Description

fileId

path

integer(int64)

true

ID of file that needs to be updated

name

query

string

false

Name of file that needs to be updated

status

query

string

false

Status of file that needs to be updated

Responses

Status
Meaning
Description
Schema

400

Invalid input

None

To perform this operation, you must be authenticated by means of one of the following methods: nimbus_auth ( Scopes: write:files read:files )

deleteNimbusFile

Code samples

import requests
headers = {
  'api_key': 'string',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('http://localhost:8080/api/v1/file/{fileId}', headers = headers)

print(r.json())

DELETE /file/{fileId}

Deletes a file

delete a file

Parameters

Name
In
Type
Required
Description

api_key

header

string

false

none

fileId

path

integer(int64)

true

File id to delete

Responses

Status
Meaning
Description
Schema

400

Invalid file value

None

To perform this operation, you must be authenticated by means of one of the following methods: nimbus_auth ( Scopes: write:files read:files )

Last updated