@@ -66,9 +66,9 @@ An API token can be created with different scopes and/or different permissions.
6666 "name": "<token-display-name>",
6767 "expiresAt": "2025-01-01T00:00:00.000Z"
6868 }' \
69- -H 'Authorization: Bearer <AUTH_TOKEN' \
69+ -H 'Authorization: Bearer <AUTH_TOKEN> ' \
7070 -H 'Content-Type: application/json' \
71- -X POST https://<URL-to-Aruna-instance-API-endpoint>/v2/user/token
71+ -X POST https://<URL-to-Aruna-instance-API-endpoint>/v2/user/tokens
7272 ```
7373
7474 ```bash linenums="1"
@@ -87,7 +87,7 @@ An API token can be created with different scopes and/or different permissions.
8787 }' \
8888 -H 'Authorization: Bearer <AUTH_TOKEN>' \
8989 -H 'Content-Type: application/json' \
90- -X POST https://<URL-to-Aruna-instance-API-endpoint>/v2/user/token
90+ -X POST https://<URL-to-Aruna-instance-API-endpoint>/v2/user/tokens
9191 ```
9292
9393 ```bash linenums="1"
@@ -106,7 +106,7 @@ An API token can be created with different scopes and/or different permissions.
106106 }' \
107107 -H 'Authorization: Bearer <AUTH_TOKEN>' \
108108 -H 'Content-Type: application/json' \
109- -X POST https://<URL-to-Aruna-instance-API-endpoint>/v2/user/token
109+ -X POST https://<URL-to-Aruna-instance-API-endpoint>/v2/user/tokens
110110 ```
111111
112112=== ":simple-rust: Rust"
@@ -419,24 +419,46 @@ the DataProxy as trusted with the user.
419419
420420=== ":simple-curl: cURL"
421421
422+ ```bash linenums="1"
423+ # Native JSON request to explicitly create new S3 credentials for the specific endpoint
424+ curl -H 'Authorization: Bearer <AUTH_TOKEN>' \
425+ -H 'Content-Type: application/json' \
426+ -X PATCH "https://<URL-to-Aruna-instance-API-endpoint>/v2/user/s3_credentials/{endpoint-id}"
427+ ```
428+
422429 ```bash linenums="1"
423430 # Native JSON request to fetch S3 credentials for the specific endpoint
424431 curl -H 'Authorization: Bearer <AUTH_TOKEN>' \
425432 -H 'Content-Type: application/json' \
426- -X GET "https://<URL-to-Aruna-instance-API-endpoint>/v2/user/{user-id}/ s3_credentials?endpointId= {endpoint-id}"
433+ -X GET "https://<URL-to-Aruna-instance-API-endpoint>/v2/user/s3_credentials/ {endpoint-id}"
427434 ```
428435
429436=== ":simple-rust: Rust"
430437
438+ ```rust linenums="1"
439+ // Create tonic/ArunaAPI request to explicitly create new S3 credentials for the specific endpoint
440+ let request = CreateS3CredentialsUserTokenRequest {
441+ endpoint_id: "<endpoint-id>".to_string(),
442+ };
443+
444+ // Get/Create S3 credentials to register user at DataProxy
445+ let response = user_client.create_s3_credentials_user_token(request)
446+ .await
447+ .unwrap()
448+ .into_inner();
449+
450+ // Do something with the response
451+ println!("{:#?}", response);
452+ ```
453+
431454 ```rust linenums="1"
432455 // Create tonic/ArunaAPI request to fetch S3 credentials for the specific endpoint
433- let request = GetS3CredentialsUserRequest {
434- user_id: "<user-id>".to_string(),
456+ let request = GetS3CredentialsUserTokenRequest {
435457 endpoint_id: "<endpoint-id>".to_string(),
436458 };
437459
438460 // Get/Create S3 credentials to register user at DataProxy
439- let response = user_client.get_s3_credentials_user (request)
461+ let response = user_client.get_s3_credentials_user_token (request)
440462 .await
441463 .unwrap()
442464 .into_inner();
@@ -447,15 +469,27 @@ the DataProxy as trusted with the user.
447469
448470=== ":simple-python: Python"
449471
472+ ```python linenums="1"
473+ # Create tonic/ArunaAPI request to explicitly create new S3 credentials for the specific endpoint
474+ request = CreateS3CredentialsUserTokenRequest(
475+ endpoint_id="<endpoint-id>"
476+ )
477+
478+ # Send the request to the Aruna instance gRPC endpoint
479+ response = client.user_client.CreateS3CredentialsUserToken(request=request)
480+
481+ # Do something with the response
482+ print(f'{response}')
483+ ```
484+
450485 ```python linenums="1"
451486 # Create tonic/ArunaAPI request to fetch S3 credentials for the specific endpoint
452- request = GetS3CredentialsUserRequest(
453- user_id="<user-id>",
487+ request = GetS3CredentialsUserTokenRequest(
454488 endpoint_id="<endpoint-id>"
455489 )
456490
457491 # Send the request to the Aruna instance gRPC endpoint
458- response = client.user_client.GetS3CredentialsUser (request=request)
492+ response = client.user_client.GetS3CredentialsUserToken (request=request)
459493
460494 # Do something with the response
461495 print(f'{response}')
0 commit comments