OAuth clients¶
OAuth clients provide an OAuth 2.0-based way to authenticate programmatic access to Atlan.
Create an OAuth client¶
To create a new OAuth client, provide a name and role. Optionally, associate it with personas using their qualified names:
Under construction
This feature is not yet available in the Java SDK.
| Create an OAuth client | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
- Use
asset.find_personas_by_name()to retrieve the persona you want to associate with the OAuth client. This returns a list of personas matching the given name. - Extract the
qualified_namefrom the first matching persona. This is thepersonaQNthat can be used to link the OAuth client to the persona. - Use the
oauth_client.create()method to create a new OAuth client. - You must provide a unique name for the OAuth client.
-
You must provide a role for the OAuth client. This determines the permissions the OAuth client will have. Common roles include
Admin,Member, andGuest— these correspond to the roles you see in the Atlan UI.Invalid role will raise an error
If you provide an invalid role, a
NotFoundErrorwill be raised with a message showing the available roles. -
Optionally provide a description for the OAuth client.
- Optionally provide a list of persona qualified names to associate with the OAuth client. This grants the OAuth client the permissions defined in those personas.
- The
client_idis the unique identifier for the OAuth client. It will be prefixed withoauth-client-. -
The
client_secretis only available in this immediate response after creation.Cannot be accessed again later
You will not be able to retrieve the client secret again at a later point. Make sure to securely store it immediately after creation.
-
The
display_nameis the name you provided when creating the OAuth client. - The
created_byindicates which user created the OAuth client. - The
created_atis the timestamp when the OAuth client was created.
Under construction
This feature is not yet available in the Kotlin SDK.
Under construction
This feature is not yet available in the Go SDK.
| POST /api/service/oauth-clients | |
|---|---|
1 2 3 4 5 6 | |
- You must provide a unique name for the OAuth client.
- Optionally provide a description for the OAuth client.
- You must provide a role to the OAuth client. Common roles include
$admin,$member, and$guest. - Optionally provide a list of persona qualified names to associate with the OAuth client.
Retrieve OAuth clients¶
You can retrieve OAuth clients with pagination support and iterate through them:
Under construction
This feature is not yet available in the Java SDK.
| Retrieve OAuth clients with pagination | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
- Use the
oauth_client.get()method to retrieve OAuth clients with pagination. - (Optional) The
limitparameter specifies the maximum number of results to return. Defaults to20. - (Optional) The
offsetparameter specifies the starting position for pagination. Defaults to0. - (Optional) The
sortparameter specifies the field to sort results by. Use-prefix for descending order (e.g.,-createdAtfor newest first). - The
total_recordproperty contains the total count of OAuth clients. -
You can iterate directly over the response object. This will lazily load and loop through each page of results until the loop finishes or you break out of it.
Iterating over results produces a Generator
This means that results are retrieved from the backend a page at a time. This also means that you can only iterate over the results once.
Under construction
This feature is not yet available in the Kotlin SDK.
Under construction
This feature is not yet available in the Go SDK.
| GET /api/service/oauth-clients?limit=20&offset=0&sort=-createdAt&count=true | |
|---|---|
1 | |
- The pagination and sorting parameters are passed as query parameters in the URL.
Retrieve an OAuth client by ID¶
You can retrieve an OAuth client by its unique client ID:
Under construction
This feature is not yet available in the Java SDK.
| Retrieve an OAuth client by ID | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 | |
- The
oauth_client.get_by_id()method retrieves an OAuth client by its unique client ID. The client ID is prefixed withoauth-client-.
Under construction
This feature is not yet available in the Kotlin SDK.
Under construction
This feature is not yet available in the Go SDK.
| GET /api/service/oauth-clients/oauth-client-abc123def456 | |
|---|---|
1 | |
Update an OAuth client¶
You can update an OAuth client's description:
Under construction
This feature is not yet available in the Java SDK.
| Update an OAuth client | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
- First retrieve the OAuth client you want to update to get its client ID.
- Use the
oauth_client.update()method to update the OAuth client. - You must provide the
client_idof the OAuth client to update. - Provide the new description for the OAuth client.
Under construction
This feature is not yet available in the Kotlin SDK.
Under construction
This feature is not yet available in the Go SDK.
| PUT /api/service/oauth-clients/oauth-client-abc123def456 | |
|---|---|
1 2 3 4 | |
- The client ID is passed as a path parameter in the URL.
- Provide the updated description in the request body.
- Provide the updated name in the request body.
Delete an OAuth client¶
To permanently delete an OAuth client, use the purge() method:
Under construction
This feature is not yet available in the Java SDK.
| Delete an OAuth client | |
|---|---|
1 2 3 4 5 6 | |
-
Use the
oauth_client.purge()method with the client ID to permanently delete the OAuth client.Irreversible
Once deleted, the OAuth client will be permanently removed and can no longer be used for authentication. Any systems using this OAuth client's credentials will immediately lose access.
Under construction
This feature is not yet available in the Kotlin SDK.
Under construction
This feature is not yet available in the Go SDK.
| DELETE /api/service/oauth-clients/oauth-client-abc123def456 | |
|---|---|
1 | |
-
The client ID is passed as a path parameter in the URL. No request body is required.
Irreversible
Once deleted, the OAuth client will be permanently removed and can no longer be used for authentication.