Variables
Variables
Crea una nueva variable
post /variables
Crea una nueva variable
- HTTP
- cURL
- JavaScript
- Python
POST /variables HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 176
{
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "API_KEY",
"value": "my-secret-key",
"type": "string",
"createdDate": "2024-08-24T14:15:22Z",
"updatedDate": "2024-08-24T14:15:22Z"
}
curl -L \
--request POST \
--url '/variables' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "API_KEY",
"value": "my-secret-key",
"type": "string",
"createdDate": "2024-08-24T14:15:22Z",
"updatedDate": "2024-08-24T14:15:22Z"
}'
const response = await fetch('/variables', {
method: 'POST',
headers: {
"Authorization": "Bearer YOUR_SECRET_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "API_KEY",
"value": "my-secret-key",
"type": "string",
"createdDate": "2024-08-24T14:15:22Z",
"updatedDate": "2024-08-24T14:15:22Z"
})
});
const data = await response.json();
import json
import requests
response = requests.post(
"/variables",
headers={"Authorization":"Bearer YOUR_SECRET_TOKEN","Content-Type":"application/json"},
data=json.dumps({
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "API_KEY",
"value": "my-secret-key",
"type": "string",
"createdDate": "2024-08-24T14:15:22Z",
"updatedDate": "2024-08-24T14:15:22Z"
})
)
data = response.json()
Obtiene todas las variables
get /variables
Recupera una lista de todas las variables
- HTTP
- cURL
- JavaScript
- Python
GET /variables HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -L \
--url '/variables' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Accept: */*'
const response = await fetch('/variables', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_SECRET_TOKEN",
"Accept": "*/*"
},
});
const data = await response.json();
import requests
response = requests.get(
"/variables",
headers={"Authorization":"Bearer YOUR_SECRET_TOKEN","Accept":"*/*"},
)
data = response.json()
Update a variable by ID
put /variables/{id}
Update a specific variable by ID
- HTTP
- cURL
- JavaScript
- Python
PUT /variables/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 176
{
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "API_KEY",
"value": "my-secret-key",
"type": "string",
"createdDate": "2024-08-24T14:15:22Z",
"updatedDate": "2024-08-24T14:15:22Z"
}
curl -L \
--request PUT \
--url '/variables/{id}' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "API_KEY",
"value": "my-secret-key",
"type": "string",
"createdDate": "2024-08-24T14:15:22Z",
"updatedDate": "2024-08-24T14:15:22Z"
}'
const response = await fetch('/variables/{id}', {
method: 'PUT',
headers: {
"Authorization": "Bearer YOUR_SECRET_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "API_KEY",
"value": "my-secret-key",
"type": "string",
"createdDate": "2024-08-24T14:15:22Z",
"updatedDate": "2024-08-24T14:15:22Z"
})
});
const data = await response.json();
import json
import requests
response = requests.put(
"/variables/{id}",
headers={"Authorization":"Bearer YOUR_SECRET_TOKEN","Content-Type":"application/json"},
data=json.dumps({
"id": "cfd531e0-82fc-11e9-bc42-526af7764f64",
"name": "API_KEY",
"value": "my-secret-key",
"type": "string",
"createdDate": "2024-08-24T14:15:22Z",
"updatedDate": "2024-08-24T14:15:22Z"
})
)
data = response.json()
Elimina una variable por ID
delete /variables/{id}
Elimina una variable específica por su ID
- HTTP
- cURL
- JavaScript
- Python
DELETE /variables/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -L \
--request DELETE \
--url '/variables/{id}' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Accept: */*'
const response = await fetch('/variables/{id}', {
method: 'DELETE',
headers: {
"Authorization": "Bearer YOUR_SECRET_TOKEN",
"Accept": "*/*"
},
});
const data = await response.json();
import requests
response = requests.delete(
"/variables/{id}",
headers={"Authorization":"Bearer YOUR_SECRET_TOKEN","Accept":"*/*"},
)
data = response.json()