Skip to content

Last updated: July 22, 2025

DQOps REST API shared_credentials operations

Operations for managing shared credentials in DQOps. Credentials that are stored in the shared .credentials folder in the DQOps user's home folder.


create_shared_credential

Creates (adds) a new shared credential, which creates a file in the DQOps user's home .credentials/ folder named as the credential and with the content that is provided in this call.

Follow the link to see the source code on GitHub.

POST

http://localhost:8888/api/credentials

Request body

 Description                       Data type   Required 
Shared credential model SharedCredentialModel

Usage examples

Execution

curl -X POST http://localhost:8888/api/credentials^
    -H "Accept: application/json"^
    -H "Content-Type: application/json"^
    -d^
    "{\"credential_name\":\"sample_credential\",\"type\":\"text\",\"text_value\":\"sample_credential_text_value\"}"

Execution

from dqops import client
from dqops.client.api.shared_credentials import create_shared_credential
from dqops.client.models import CredentialType, \
                                SharedCredentialModel

dqops_client = client.Client(
    'http://localhost:8888/'
)

request_body = SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

call_result = create_shared_credential.sync(
    client=dqops_client,
    json_body=request_body
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import create_shared_credential
from dqops.client.models import CredentialType, \
                                SharedCredentialModel

dqops_client = client.Client(
    'http://localhost:8888/'
)

request_body = SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

call_result = await create_shared_credential.asyncio(
    client=dqops_client,
    json_body=request_body
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import create_shared_credential
from dqops.client.models import CredentialType, \
                                SharedCredentialModel

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token
)

request_body = SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

call_result = create_shared_credential.sync(
    client=dqops_client,
    json_body=request_body
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import create_shared_credential
from dqops.client.models import CredentialType, \
                                SharedCredentialModel

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token
)

request_body = SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

call_result = await create_shared_credential.asyncio(
    client=dqops_client,
    json_body=request_body
)

delete_shared_credential

Deletes a shared credential file from the DQOps user's home .credentials/ folder.

Follow the link to see the source code on GitHub.

DELETE

http://localhost:8888/api/credentials/{credentialName}

Parameters of this method are described below

 Property name   Description                       Data type   Required 
credential_name Full shared credential name string

Usage examples

Execution

curl -X DELETE http://localhost:8888/api/credentials/sample_credential^
    -H "Accept: application/json"

Execution

from dqops import client
from dqops.client.api.shared_credentials import delete_shared_credential

dqops_client = client.Client(
    'http://localhost:8888/'
)

call_result = delete_shared_credential.sync(
    'sample_credential',
    client=dqops_client
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import delete_shared_credential

dqops_client = client.Client(
    'http://localhost:8888/'
)

call_result = await delete_shared_credential.asyncio(
    'sample_credential',
    client=dqops_client
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import delete_shared_credential

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token
)

call_result = delete_shared_credential.sync(
    'sample_credential',
    client=dqops_client
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import delete_shared_credential

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token
)

call_result = await delete_shared_credential.asyncio(
    'sample_credential',
    client=dqops_client
)

download_shared_credential

Downloads a shared credential's file

Follow the link to see the source code on GitHub.

GET

http://localhost:8888/api/credentials/{credentialName}/download

Parameters of this method are described below

 Property name   Description                       Data type   Required 
credential_name Shared credential file name string

Usage examples

Execution

curl http://localhost:8888/api/credentials/sample_credential/download^
    -H "Accept: application/json"

Execution

from dqops import client
from dqops.client.api.shared_credentials import download_shared_credential

dqops_client = client.Client(
    'http://localhost:8888/',
    raise_on_unexpected_status=True
)

call_result = download_shared_credential.sync(
    'sample_credential',
    client=dqops_client
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import download_shared_credential

dqops_client = client.Client(
    'http://localhost:8888/',
    raise_on_unexpected_status=True
)

call_result = await download_shared_credential.asyncio(
    'sample_credential',
    client=dqops_client
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import download_shared_credential

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token,
    raise_on_unexpected_status=True
)

call_result = download_shared_credential.sync(
    'sample_credential',
    client=dqops_client
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import download_shared_credential

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token,
    raise_on_unexpected_status=True
)

call_result = await download_shared_credential.asyncio(
    'sample_credential',
    client=dqops_client
)

get_all_shared_credentials

Returns a list of all shared credentials that are present in the DQOps user's home .credentials/ folder.

Follow the link to see the source code on GitHub.

GET

http://localhost:8888/api/credentials

Return value

 Property name   Description                       Data type 
shared_credential_list_model List[SharedCredentialListModel]

Usage examples

Execution

curl http://localhost:8888/api/credentials^
    -H "Accept: application/json"
Expand to see the returned result
[ {
  "can_edit" : false,
  "can_access_credential" : false
}, {
  "can_edit" : false,
  "can_access_credential" : false
}, {
  "can_edit" : false,
  "can_access_credential" : false
} ]

Execution

from dqops import client
from dqops.client.api.shared_credentials import get_all_shared_credentials

dqops_client = client.Client(
    'http://localhost:8888/',
    raise_on_unexpected_status=True
)

call_result = get_all_shared_credentials.sync(
    client=dqops_client
)
Expand to see the returned result
[
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    ),
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    ),
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    )
]

Execution

from dqops import client
from dqops.client.api.shared_credentials import get_all_shared_credentials

dqops_client = client.Client(
    'http://localhost:8888/',
    raise_on_unexpected_status=True
)

call_result = await get_all_shared_credentials.asyncio(
    client=dqops_client
)
Expand to see the returned result
[
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    ),
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    ),
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    )
]

Execution

from dqops import client
from dqops.client.api.shared_credentials import get_all_shared_credentials

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token,
    raise_on_unexpected_status=True
)

call_result = get_all_shared_credentials.sync(
    client=dqops_client
)
Expand to see the returned result
[
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    ),
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    ),
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    )
]

Execution

from dqops import client
from dqops.client.api.shared_credentials import get_all_shared_credentials

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token,
    raise_on_unexpected_status=True
)

call_result = await get_all_shared_credentials.asyncio(
    client=dqops_client
)
Expand to see the returned result
[
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    ),
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    ),
    SharedCredentialListModel(
        can_edit=False,
        can_access_credential=False
    )
]

get_shared_credential

Returns a shared credential content

Follow the link to see the source code on GitHub.

GET

http://localhost:8888/api/credentials/{credentialName}

Return value

 Property name   Description                       Data type 
shared_credential_model SharedCredentialModel

Parameters of this method are described below

 Property name   Description                       Data type   Required 
credential_name Shared credential file name string

Usage examples

Execution

curl http://localhost:8888/api/credentials/sample_credential^
    -H "Accept: application/json"
Expand to see the returned result
{
  "credential_name" : "sample_credential",
  "type" : "text",
  "text_value" : "sample_credential_text_value"
}

Execution

from dqops import client
from dqops.client.api.shared_credentials import get_shared_credential

dqops_client = client.Client(
    'http://localhost:8888/',
    raise_on_unexpected_status=True
)

call_result = get_shared_credential.sync(
    'sample_credential',
    client=dqops_client
)
Expand to see the returned result
SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import get_shared_credential

dqops_client = client.Client(
    'http://localhost:8888/',
    raise_on_unexpected_status=True
)

call_result = await get_shared_credential.asyncio(
    'sample_credential',
    client=dqops_client
)
Expand to see the returned result
SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import get_shared_credential

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token,
    raise_on_unexpected_status=True
)

call_result = get_shared_credential.sync(
    'sample_credential',
    client=dqops_client
)
Expand to see the returned result
SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import get_shared_credential

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token,
    raise_on_unexpected_status=True
)

call_result = await get_shared_credential.asyncio(
    'sample_credential',
    client=dqops_client
)
Expand to see the returned result
SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

update_shared_credential

Updates an existing shared credential, replacing the credential's file content.

Follow the link to see the source code on GitHub.

PUT

http://localhost:8888/api/credential/{credentialName}

Parameters of this method are described below

 Property name   Description                       Data type   Required 
credential_name Credential file name that will be updated string

Request body

 Description                       Data type   Required 
Shared credential model SharedCredentialModel

Usage examples

Execution

curl -X PUT http://localhost:8888/api/credential/sample_credential^
    -H "Accept: application/json"^
    -H "Content-Type: application/json"^
    -d^
    "{\"credential_name\":\"sample_credential\",\"type\":\"text\",\"text_value\":\"sample_credential_text_value\"}"

Execution

from dqops import client
from dqops.client.api.shared_credentials import update_shared_credential
from dqops.client.models import CredentialType, \
                                SharedCredentialModel

dqops_client = client.Client(
    'http://localhost:8888/'
)

request_body = SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

call_result = update_shared_credential.sync(
    'sample_credential',
    client=dqops_client,
    json_body=request_body
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import update_shared_credential
from dqops.client.models import CredentialType, \
                                SharedCredentialModel

dqops_client = client.Client(
    'http://localhost:8888/'
)

request_body = SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

call_result = await update_shared_credential.asyncio(
    'sample_credential',
    client=dqops_client,
    json_body=request_body
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import update_shared_credential
from dqops.client.models import CredentialType, \
                                SharedCredentialModel

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token
)

request_body = SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

call_result = update_shared_credential.sync(
    'sample_credential',
    client=dqops_client,
    json_body=request_body
)

Execution

from dqops import client
from dqops.client.api.shared_credentials import update_shared_credential
from dqops.client.models import CredentialType, \
                                SharedCredentialModel

token = 's4mp13_4u7h_70k3n'

dqops_client = client.AuthenticatedClient(
    'http://localhost:8888/',
    token=token
)

request_body = SharedCredentialModel(
    credential_name='sample_credential',
    type=CredentialType.TEXT,
    text_value='sample_credential_text_value'
)

call_result = await update_shared_credential.asyncio(
    'sample_credential',
    client=dqops_client,
    json_body=request_body
)