Skip to content

Commit c9b36fc

Browse files
committed
updated readme
1 parent d411cd9 commit c9b36fc

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The client supports multiple authentication scenarios:
4242

4343
### Deprecated Endpoints
4444

45-
The following endpoints are deprecated and cannot be used in harness mode:
45+
The following Split endpoints are deprecated and cannot be used in harness mode:
4646
- `/workspaces`: POST, PATCH, DELETE, PUT verbs are deprecated
4747
- `/apiKeys`: POST verb for apiKeyType == 'admin' is deprecated
4848
- `/users`: all verbs are deprecated
@@ -120,6 +120,22 @@ service_accounts = client.service_account.list(account_id)
120120
for sa in service_accounts:
121121
print(f"Service Account: {sa.name}, ID: {sa.id}")
122122
```
123+
For most creation, update, and delete endpoints for harness specific resources, you will need to pass through the JSON body directly.
124+
125+
Example:
126+
```python
127+
# Create a new service account
128+
sa_data = {
129+
'name': sa_name,
130+
'identifier': sa_identifier,
131+
'email': "test@harness.io",
132+
'accountIdentifier': account_id,
133+
'description': 'Service account for dependency chain test',
134+
'tags': {'test': 'test tag'}
135+
}
136+
137+
new_sa = client.service_account.create(sa_data, account_id)
138+
```
123139

124140
For detailed examples and API specifications for each resource, please refer to the [Harness API documentation](https://apidocs.harness.io/).
125141

0 commit comments

Comments
 (0)