TypeScript SDK
import { WebApiSDK } from "@parable-platform/web-api-sdk";
const sdk = new WebApiSDK({
baseUrl: process.env.PARABLE_API_URL!,
auth: { token: process.env.PARABLE_API_TOKEN! },
requestInterceptor: (config) => ({
...config,
headers: { ...config.headers, "X-Tenant": process.env.PARABLE_WORKSPACE! },
}),
});
const result = await sdk.users.user(
"550e8400-e29b-41d4-a716-446655440000"
);import os
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
result = sdk.users.user('550e8400-e29b-41d4-a716-446655440000')use parable_web_api_sdk::{namespaces, ClientConfig, RequestOptions, WebApiSdk};
let sdk = WebApiSdk::new(ClientConfig::with_base_url(
std::env::var("PARABLE_API_URL")?,
Some(std::env::var("PARABLE_API_TOKEN")?),
None,
))?;
let options = RequestOptions::with_header("X-Tenant", std::env::var("PARABLE_WORKSPACE")?, None, None);
let input = namespaces::users::UserInput {
user_id: serde_json::from_value(serde_json::json!("550e8400-e29b-41d4-a716-446655440000"))?,
};
let result = sdk.users.user(
input,
Some(&options)
).await?;sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input namespaces.UsersUserInput
if err := json.Unmarshal([]byte(`{"userId":"550e8400-e29b-41d4-a716-446655440000"}`), &input); err != nil {
return err
}
result, err := sdk.UsersNamespace.User(ctx, input){
"data": {
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"email": "jsmith@example.com",
"id": "<string>",
"name": "<string>",
"requireStrongAuth": true,
"roles": [
{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"id": "<string>",
"kind": "internal",
"name": "<string>",
"permissions": [
"<string>"
],
"sortOrder": 0,
"caution": "<string>",
"description": "<string>",
"icon": "<string>",
"parentRoleId": "<string>"
}
],
"status": "PENDING",
"tenantId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"userId": "<string>",
"locale": "<string>",
"timezone": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}People
Read one person
Returns one member of this Workspace.
GET
/
api
/
users
/
user
TypeScript SDK
import { WebApiSDK } from "@parable-platform/web-api-sdk";
const sdk = new WebApiSDK({
baseUrl: process.env.PARABLE_API_URL!,
auth: { token: process.env.PARABLE_API_TOKEN! },
requestInterceptor: (config) => ({
...config,
headers: { ...config.headers, "X-Tenant": process.env.PARABLE_WORKSPACE! },
}),
});
const result = await sdk.users.user(
"550e8400-e29b-41d4-a716-446655440000"
);import os
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
result = sdk.users.user('550e8400-e29b-41d4-a716-446655440000')use parable_web_api_sdk::{namespaces, ClientConfig, RequestOptions, WebApiSdk};
let sdk = WebApiSdk::new(ClientConfig::with_base_url(
std::env::var("PARABLE_API_URL")?,
Some(std::env::var("PARABLE_API_TOKEN")?),
None,
))?;
let options = RequestOptions::with_header("X-Tenant", std::env::var("PARABLE_WORKSPACE")?, None, None);
let input = namespaces::users::UserInput {
user_id: serde_json::from_value(serde_json::json!("550e8400-e29b-41d4-a716-446655440000"))?,
};
let result = sdk.users.user(
input,
Some(&options)
).await?;sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input namespaces.UsersUserInput
if err := json.Unmarshal([]byte(`{"userId":"550e8400-e29b-41d4-a716-446655440000"}`), &input); err != nil {
return err
}
result, err := sdk.UsersNamespace.User(ctx, input){
"data": {
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"email": "jsmith@example.com",
"id": "<string>",
"name": "<string>",
"requireStrongAuth": true,
"roles": [
{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"id": "<string>",
"kind": "internal",
"name": "<string>",
"permissions": [
"<string>"
],
"sortOrder": 0,
"caution": "<string>",
"description": "<string>",
"icon": "<string>",
"parentRoleId": "<string>"
}
],
"status": "PENDING",
"tenantId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"userId": "<string>",
"locale": "<string>",
"timezone": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Read one person
read_personAuthorizations
Headers
Was this page helpful?