-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Link API docs #20308
Add Link API docs #20308
Conversation
ecca76c
to
678f8d0
Compare
678f8d0
to
2391deb
Compare
|
||
| Blocking Queries | Consistency Modes | Agent Caching | ACL Required | | ||
| ---------------- | --------------------- | ------------- | ------------------------------ | | ||
| `NO` | `stale`, `consistent` | `none` | `operator:write`, `acl:write` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a question about this table (and the similar ones below) that I asked in a thread here. This is my best guess at filling out this table but not sure if it's correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an expert in this area, but it looks fine to me.
{ | ||
"data": { | ||
"resourceId": "organization/c0bf7aac-7690-4905-a8aa-889df1510314/project/6e82a47b-79af-4920-ad42-c0f74421ab52/hashicorp.consul.global-network-manager.cluster/my-cluster", | ||
"clientId": "3jz6zk2tlr802htzwquczlxlsrohlpm5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The clientId/clientSecret I used here are random strings I generated and pasted in place of the real ones that I used to generate these samples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall, this looks good!
can you also add a brief description to the main api docs overview page? id suggest putting it in "manage consul" or creating a section dedicated to hcpc
### Link API vs. Configuration-based Linking | ||
|
||
The Link API described here is an alternative method to accomplish the same thing as [configuration-based linking](/consul/docs/agent/config/config-files#self-managed-hcp-parameters). You should generally only choose one method or the other for linking your cluster, not both. If you do use both methods, they interract in the following ways: | ||
|
||
* Values set in the configuration will take precedence over what was set in the API/CLI when Consul is started. | ||
* SMCC can only be unlinked by the API/CLI, regardless of if they were established via configuration or API/CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would move this to the top (right above the json request body schema) since this is something you want to read/know about before you use the endpoint
--- | ||
|
||
# Link HTTP API | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a one sentence description of this endpoint ( /api/hcp/v2/link/global
)
for example, this is one for the events endpoint:
The
/event
endpoints fire new events and to query the available events in Consul.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
The `/api/hcp/v2/link/global` endpoint allows you to link your Consul cluster to HCP Consul Central.
|
||
| Blocking Queries | Consistency Modes | Agent Caching | ACL Required | | ||
| ---------------- | --------------------- | ------------- | ------------------------------ | | ||
| `NO` | `stale`, `consistent` | `none` | `operator:write`, `acl:write` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an expert in this area, but it looks fine to me.
Co-authored-by: Melissa Kam <3768460+mkam@users.noreply.github.com>
Co-authored-by: Melissa Kam <3768460+mkam@users.noreply.github.com>
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
3a63bf3
to
a7832f0
Compare
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
FYI docs do not need changelings @NickCellino |
Description
This adds API docs for the new HCP Consul Central Link API. It includes sections for:
I have also added a new section in the API Structure document that points out the header that we are now adding to every request (#20220).
Testing & Reproduction steps
I used the instructions here to run this locally so I could view the docs: https://github.com/hashicorp/consul/tree/main/website#with-node
Links
https://hashicorp.atlassian.net/browse/CC-7133
PR Checklist