-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edit doc entries for sharing routes with spaces
Co-authored-by: Merric de Launey <[email protected]> Co-authored-by: David Alvarado <[email protected]>
- Loading branch information
1 parent
f631935
commit 0ee2a98
Showing
5 changed files
with
136 additions
and
121 deletions.
There are no files selected for viewing
121 changes: 0 additions & 121 deletions
121
docs/v3/source/includes/experimental_resources/_share_routes.md.erb
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
docs/v3/source/includes/resources/routes/_list_shared_routes.md.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
### Lists shared spaces relationship (experimental) | ||
|
||
Lists the spaces that the route has been shared to. | ||
|
||
``` | ||
Example Request | ||
``` | ||
|
||
```shell | ||
curl "https://api.example.org/v3/routes/[guid]/relationships/shared_spaces" \ | ||
-H "Authorization: bearer [token]" \ | ||
-H "Content-type: application/json" | ||
``` | ||
|
||
```http | ||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"data": [ | ||
{ "guid": "space-one-guid" }, | ||
{ "guid": "space-two-guid" } | ||
], | ||
"links": { | ||
"self": { | ||
"href":"http://api.example.com/v3/routes/[guid]/relationships/shared_spaces" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
#### Definition | ||
`GET /v3/routes/:guid/relationships/shared_spaces` | ||
|
||
#### Permitted roles | ||
|
||
| | ||
--- | | ||
Admin | | ||
Admin Read-Only | | ||
Global Auditor | | ||
Org Auditor | | ||
Org Manager | | ||
Space Auditor | | ||
Space Developer | | ||
Space Manager | | ||
Space Supporter | |
55 changes: 55 additions & 0 deletions
55
docs/v3/source/includes/resources/routes/_share_routes.md.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
### Share a route with other spaces (experimental) | ||
|
||
This endpoint shares the route with the specified spaces. In order to share into a space the requesting user must have write permission in the target space. | ||
|
||
``` | ||
Example Request | ||
``` | ||
|
||
```shell | ||
curl "https://api.example.org/v3/routes/[guid]/relationships/shared_spaces" \ | ||
-X POST \ | ||
-H "Authorization: bearer [token]" \ | ||
-H "Content-type: application/json" \ | ||
-d '{ | ||
"data": [ | ||
{ "guid": "space-one-guid" }, | ||
{ "guid": "space-two-guid" } | ||
] | ||
}' | ||
``` | ||
|
||
```http | ||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
|
||
{ | ||
"data": [ | ||
{ "guid": "space-one-guid" }, | ||
{ "guid": "space-two-guid" } | ||
], | ||
"links": { | ||
"self": { | ||
"href":"http://api.example.com/v3/routes/[guid]/relationships/shared_spaces" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
#### Definition | ||
`POST /v3/routes/:guid/relationships/shared_spaces` | ||
|
||
#### Required parameters | ||
|
||
Name | Type | Description | ||
---- | ---- | ----------- | ||
**data** | [_to-many relationship_](#to-many-relationships) | Shared space relationships; each space will have this route shared to it | ||
|
||
#### Permitted roles | ||
|
||
| | ||
--- | | ||
Admin | | ||
Space Developer | | ||
Space Supporter | | ||
|
31 changes: 31 additions & 0 deletions
31
docs/v3/source/includes/resources/routes/_unshare_routes.md.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
### Unshare a route that was shared with another space (experimental) | ||
|
||
Unshares a route that was shared with another space. | ||
|
||
``` | ||
Example Request | ||
``` | ||
|
||
```shell | ||
curl "https://api.example.org/v3/routes/:guid/relationships/shared_spaces/[space_guid]" \ | ||
-X DELETE \ | ||
-H "Authorization: bearer [token]" \ | ||
-H "Content-type: application/json" | ||
``` | ||
|
||
```http | ||
HTTP/1.1 204 No Content | ||
``` | ||
|
||
#### Definition | ||
`DELETE /v3/routes/:guid/relationships/shared_spaces/:space_guid` | ||
|
||
#### Permitted roles | ||
|
||
| | ||
--- | | ||
Admin | | ||
Space Developer | | ||
Space Supporter | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters