Make a Hugging Face token the default
const url = 'https://example.com/v1/integrations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/default';const options = {method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/v1/integrations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/default \ --header 'X-API-Key: <X-API-Key>'Make a Hugging Face token the one new runs use. Workspaces on the old default move to it.
Needs integrations:write and Admin on the organization.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Successful Response
One integration key, without its value.
object
The integration key’s ID
The service the key is for
The key’s name
The key’s last four characters; null for a key shorter than 12
The Hugging Face token new runs use
The person who added it
When it was added
When it expires
Example
{ "provider": "huggingface"}Invalid or missing API key
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}Missing integrations:write or Admin
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}Not found or access denied
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}Not a Hugging Face token
Standard error response.
object
Error message describing what went wrong
Example generated
{ "detail": "example"}