Files
Creating a Folder
curl --request POST \
--url https://api.splight.com/v3/engine/file/folders/ \
--header 'authorization: Splight <access_id> <secret_key>' \
--header 'content-type: application/json' \
--data '{
"name": "<name>",
"parent": "<parent_id>"
}'import requests
ACCESS_ID = "<user_access_id>" # Replace with your access ID
SECRET_KEY = "<user_secret_key>" # Replace with your secret key
url = "https://api.splight.com/v3/engine/file/folders/"
payload = {
"name": "<name>",
"parent": "<parent_id>"
}
headers = {
'authorization': f'Splight {ACCESS_ID} {SECRET_KEY}',
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
print(response.status_code) # Should return 201 for successful creationReading a Folder
Listing all Folders
curl --request GET \
--url https://api.splight.com/v3/engine/file/folders/ \
--header 'authorization: Splight <access_id> <secret_key>' \import requests
ACCESS_ID = "<user_access_id>" # Replace with your access ID
SECRET_KEY = "<user_secret_key>" # Replace with your secret key
url = "https://api.splight.com/v3/engine/file/folders/"
headers = {
'authorization': f'Splight {ACCESS_ID} {SECRET_KEY}',
}
response = requests.get(url, headers=headers)
print(response.json())
print(response.status_code) # Should return 200 for successful retrievalRetrive a single Folder
Deleting a Folder
Reading a File
Listing all Files from a Folder
Retrive a single File
Deleting a File
Last updated
Was this helpful?