Samples · operationId:DeleteSample, DeleteSampleByExternalId

Delete a Sample

There are two ways to call this operation:

By sample id

operationId: DeleteSample
DELETE /v1/functions/{functionId}/samples/{sampleId}

Description

Delete sample

Path parameters

NameTypeRequiredDescription
functionId string yes

sampleId string yes

Responses

StatusDescriptionBody
200 Success

Code samples

curl
curl -X DELETE \
  -H 'Authorization: Bearer <accessToken>' \
  'https://www.nyckel.com/v1/functions/<functionId>/samples/<sampleId>'
Python
import requests

url = 'https://www.nyckel.com/v1/functions/<functionId>/samples/<sampleId>'
headers = {
    'Authorization': 'Bearer <accessToken>',
}

response = requests.delete(url, headers=headers)
print(response.json())
JavaScript
fetch('https://www.nyckel.com/v1/functions/<functionId>/samples/<sampleId>', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer <accessToken>',
  },
})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://www.nyckel.com/v1/functions/<functionId>/samples/<sampleId>');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');

$headers = array(
    'Authorization: Bearer <accessToken>',
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);
echo $response;

By externalId

operationId: DeleteSampleByExternalId
DELETE /v1/functions/{functionId}/samples

Description

Delete sample by external id

Path parameters

NameTypeRequiredDescription
functionId string yes

Query parameters

NameTypeRequiredDescription
externalId string no

The externalId of the Sample

Responses

StatusDescriptionBody
200 Success

Code samples

curl
curl -X DELETE \
  -H 'Authorization: Bearer <accessToken>' \
  'https://www.nyckel.com/v1/functions/<functionId>/samples'
Python
import requests

url = 'https://www.nyckel.com/v1/functions/<functionId>/samples'
headers = {
    'Authorization': 'Bearer <accessToken>',
}

response = requests.delete(url, headers=headers)
print(response.json())
JavaScript
fetch('https://www.nyckel.com/v1/functions/<functionId>/samples', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer <accessToken>',
  },
})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://www.nyckel.com/v1/functions/<functionId>/samples');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');

$headers = array(
    'Authorization: Bearer <accessToken>',
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);
echo $response;