Create secret
import requests
url = "https://api.datagrid.com/v1/secrets"
payload = {
"name": "<string>",
"value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', value: '<string>'})
};
fetch('https://api.datagrid.com/v1/secrets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"value": "<string>"
}
'{
"object": "secret",
"id": "<string>",
"created_at": "<string>",
"name": "<string>"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Secrets
Create secret
Create a new secret that can be referenced in converse API calls.
POST
/
secrets
Create secret
import requests
url = "https://api.datagrid.com/v1/secrets"
payload = {
"name": "<string>",
"value": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', value: '<string>'})
};
fetch('https://api.datagrid.com/v1/secrets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/secrets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"value": "<string>"
}
'{
"object": "secret",
"id": "<string>",
"created_at": "<string>",
"name": "<string>"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Successfully created secret
The Secret object represents a securely stored secret that can be referenced in converse API calls.