Skip to main content
POST
/
streaming
/
directories
Create directory
curl --request POST \
  --url https://api.gcore.com/streaming/directories \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "New series. Season 1",
  "parent_id": 100
}
'
{
  "id": 100,
  "name": "New series",
  "parent_id": null,
  "items_count": 2,
  "created_at": "2024-07-01T18:00:00Z",
  "updated_at": "2024-07-01T18:00:00Z"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Body

application/json
name
string
required

Title of the directory.

parent_id
integer

ID of a parent directory. "null" if it's in the root.

Response

Successful

id
integer

ID of the directory

name
string

Title of the directory

parent_id
integer

ID of a parent directory. "null" if it's in the root.

items_count
integer

Number of objects in this directory. Counting files and folders. The quantity is calculated only at one level (not recursively in all subfolders).

created_at
string

Time of creation. Datetime in ISO 8601 format.

updated_at
string

Time of last update of the directory entity. Datetime in ISO 8601 format.