Generate a new SAS link for the projectId, environment and containerName combination. The generated link is valid for 24 hours by default if not requested by user (retention hours) otherwise.
1 min
POST
https://paasportal.episerver.net/api/v1.0/projects/{projectId}/environments/{environment}/storagecontainers/{containerName}/saslink
Path Parameters
- projectIdstring<uuid>requiredDescriptionFormatuuid
- environmentstringrequiredDescription
- containerNamestringrequiredDescription
Body Parameters
- bodyGenerateBlobContainerSasLinkRequestParametersrequiredExample
{ "retentionHours": 24 }Description- retentionHoursinteger<int32>Formatint32
Responses
200
- GenerateBlobContainerSasLinkApiResponse
- errorsstring[]
- resultGenerateBlobContainerSasLinkResponse
- environmentstring
- containerNamestring
- sasLinkstring
- expiresOnstring<date-time>Formatdate-time
- projectIdstring<uuid>Formatuuid
- successboolean
400
- BadRequestApiErrorResponseExample
401
- UnauthorizedApiErrorResponseExample
404
- NotFoundApiErrorResponseExample
500
- InternalServerErrorApiErrorResponseExample
curl
curl --request POST \
--url https://paasportal.episerver.net/api/v1.0/projects/{projectId}/environments/{environment}/storagecontainers/{containerName}/saslink \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://paasportal.episerver.net/api/v1.0/projects/{projectId}/environments/{environment}/storagecontainers/{containerName}/saslink", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://paasportal.episerver.net/api/v1.0/projects/{projectId}/environments/{environment}/storagecontainers/{containerName}/saslink")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://paasportal.episerver.net/api/v1.0/projects/{projectId}/environments/{environment}/storagecontainers/{containerName}/saslink"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"errors": [
""
],
"result": {
"environment": "",
"containerName": "",
"sasLink": "",
"expiresOn": "",
"projectId": ""
},
"success": false
}GENERATED
// OK
{
"errors": [
""
],
"result": {
"environment": "",
"containerName": "",
"sasLink": "",
"expiresOn": "",
"projectId": ""
},
"success": false
}response
{
"success": true,
"errors": [],
"result": {
"projectId": "c943975b-d468-4b85-8e62-5967b9eeeece",
"environment": "Preproduction",
"containerName": "deploymentpackages",
"sasLink": "https://codepackagesrepo.blob.core.windows.net/deploymentpackages",
"expiresOn": "2021-03-05T06:13:29.1772593Z"
}
}400
// BadRequest
{}GENERATED
// BadRequest
{}response
{
"success": false,
"errors": [
"Project Id is a required field."
],
"result": null
}401
// Unauthorized
{}GENERATED
// Unauthorized
{}response
{
"success": false,
"errors": [
"Access is denied for project c943975b-d468-4b85-8e62-5967b9eeeece or environment Preproduction."
],
"result": null
}404
// NotFound
{}GENERATED
// NotFound
{}response
{
"success": false,
"errors": [
"There is no active project found for project id: c943975b-d468-4b85-8e62-5967b9eeeece."
],
"result": null
}500
// InternalServerError
{}GENERATED
// InternalServerError
{}response
{
"success": false,
"errors": [
"An error occurred while processing the request; Try again later."
],
"result": null
}