Skip to content

Commit 2290a88

Browse files
committed
chore(release): 1.2.1 [skip ci]
1 parent 88fb676 commit 2290a88

File tree

3 files changed

+55
-57
lines changed

3 files changed

+55
-57
lines changed

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.2.1](https://github.com/salesforcecli/plugin-api/compare/1.2.0...1.2.1) (2024-08-27)
2+
3+
### Bug Fixes
4+
5+
- remove code block from examples ([0aa98ba](https://github.com/salesforcecli/plugin-api/commit/0aa98ba9a87870750be4d02c936be460ddb14cdc))
6+
17
# [1.2.0](https://github.com/salesforcecli/plugin-api/compare/1.1.0...1.2.0) (2024-08-22)
28

39
### Features

Diff for: README.md

+48-56
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ sf plugins
6666

6767
Execute GraphQL statements
6868

69-
````
69+
```
7070
USAGE
7171
$ sf api request graphql -o <value> --body file [--json] [--flags-dir <value>] [--api-version <value>] [-S Example:
7272
report.xlsx | -i]
@@ -94,86 +94,78 @@ EXAMPLES
9494
- Runs the graphql query directly via the command line
9595
sf api request graphql --body "query accounts { uiapi { query { Account { edges { node { Id \n Name { value } } } } } } }"
9696
- Runs a mutation to create an Account, with an `example.txt` file, containing
97-
```text
98-
mutation AccountExample{
99-
uiapi {
100-
AccountCreate(input: {
101-
Account: {
102-
Name: "Trailblazer Express"
103-
}
104-
}) {
105-
Record {
106-
Id
107-
Name {
108-
value
97+
mutation AccountExample{
98+
uiapi {
99+
AccountCreate(input: {
100+
Account: {
101+
Name: "Trailblazer Express"
102+
}
103+
}) {
104+
Record {
105+
Id
106+
Name {
107+
value
108+
}
109109
}
110110
}
111111
}
112112
}
113-
}
114-
````
115-
116-
$ sf api request graphql --body example.txt
117-
will create a new account returning specified fields (Id, Name)
118-
113+
$ sf api request graphql --body example.txt
114+
will create a new account returning specified fields (Id, Name)
119115
```
120116

121-
_See code: [src/commands/api/request/graphql.ts](https://github.com/salesforcecli/plugin-api/blob/1.2.0/src/commands/api/request/graphql.ts)_
117+
_See code: [src/commands/api/request/graphql.ts](https://github.com/salesforcecli/plugin-api/blob/1.2.1/src/commands/api/request/graphql.ts)_
122118

123119
## `sf api request rest ENDPOINT`
124120

125121
Make an authenticated HTTP request to Salesforce REST API and print the response.
126122

127123
```
128-
129124
USAGE
130-
$ sf api request rest ENDPOINT -o <value> [--flags-dir <value>] [--api-version <value>] [-i | -S Example:
131-
report.xlsx] [-X GET|POST|PUT|PATCH|HEAD|DELETE|OPTIONS|TRACE] [-H key:value...] [--body file]
125+
$ sf api request rest ENDPOINT -o <value> [--flags-dir <value>] [--api-version <value>] [-i | -S Example:
126+
report.xlsx] [-X GET|POST|PUT|PATCH|HEAD|DELETE|OPTIONS|TRACE] [-H key:value...] [--body file]
132127
133128
ARGUMENTS
134-
ENDPOINT Salesforce API endpoint
129+
ENDPOINT Salesforce API endpoint
135130
136131
FLAGS
137-
-H, --header=key:value... HTTP header in "key:value" format.
138-
-S, --stream-to-file=Example: report.xlsx Stream responses to a file.
139-
-X, --method=<option> [default: GET] HTTP method for the request.
140-
<options: GET|POST|PUT|PATCH|HEAD|DELETE|OPTIONS|TRACE>
141-
-i, --include Include the HTTP response status and headers in the output.
142-
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the
143-
`target-org` configuration variable is already set.
144-
--api-version=<value> Override the api version used for api requests made by this command
145-
--body=file File to use as the body for the request. Specify "-" to read from standard
146-
input; specify "" for an empty body.
132+
-H, --header=key:value... HTTP header in "key:value" format.
133+
-S, --stream-to-file=Example: report.xlsx Stream responses to a file.
134+
-X, --method=<option> [default: GET] HTTP method for the request.
135+
<options: GET|POST|PUT|PATCH|HEAD|DELETE|OPTIONS|TRACE>
136+
-i, --include Include the HTTP response status and headers in the output.
137+
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the
138+
`target-org` configuration variable is already set.
139+
--api-version=<value> Override the api version used for api requests made by this command
140+
--body=file File to use as the body for the request. Specify "-" to read from standard
141+
input; specify "" for an empty body.
147142
148143
GLOBAL FLAGS
149-
--flags-dir=<value> Import flag values from a directory.
144+
--flags-dir=<value> Import flag values from a directory.
150145
151146
EXAMPLES
152-
153-
- List information about limits in the org with alias "my-org":
154-
sf api request rest 'limits' --target-org my-org
155-
- List all endpoints
156-
sf api request rest '/'
157-
- Get the response in XML format by specifying the "Accept" HTTP header:
158-
sf api request rest 'limits' --target-org my-org --header 'Accept: application/xml'
159-
- POST to create an Account object
160-
sf api request rest 'sobjects/account' --body "{\"Name\" : \"Account from REST API\",\"ShippingCity\" : \"Boise\"}" --method POST
161-
- or with a file 'info.json' containing
162-
163-
```json
164-
{
165-
"Name": "Demo",
166-
"ShippingCity": "Boise"
167-
}
147+
- List information about limits in the org with alias "my-org":
148+
sf api request rest 'limits' --target-org my-org
149+
- List all endpoints
150+
sf api request rest '/'
151+
- Get the response in XML format by specifying the "Accept" HTTP header:
152+
sf api request rest 'limits' --target-org my-org --header 'Accept: application/xml'
153+
- POST to create an Account object
154+
sf api request rest 'sobjects/account' --body "{\"Name\" : \"Account from REST API\",\"ShippingCity\" : \"Boise\"}" --method POST
155+
- or with a file 'info.json' containing
156+
{
157+
"Name": "Demo",
158+
"ShippingCity": "Boise"
159+
}
160+
$ sf api request rest 'sobjects/account' --body info.json --method POST
161+
- Update object
162+
sf api request rest 'sobjects/account/<Account ID>' --body "{\"BillingCity\": \"San Francisco\"}" --method PATCH
168163
```
169164

170-
$ sf api request rest 'sobjects/account' --body info.json --method POST
165+
_See code: [src/commands/api/request/rest.ts](https://github.com/salesforcecli/plugin-api/blob/1.2.1/src/commands/api/request/rest.ts)_
171166

172-
- Update object
173-
sf api request rest 'sobjects/account/<Account ID>' --body "{\"BillingCity\": \"San Francisco\"}" --method PATCH
167+
<!-- commandsstop -->
174168

175169
```
176170
177-
_See code: [src/commands/api/request/rest.ts](https://github.com/salesforcecli/plugin-api/blob/1.2.0/src/commands/api/request/rest.ts)_
178-
<!-- commandsstop -->
179171
```

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@salesforce/plugin-api",
33
"description": "A plugin to call API endpoints via CLI commands",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"author": "Salesforce",
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"dependencies": {

0 commit comments

Comments
 (0)