Skip to content

feat:added api command to support a GET request against any octopus api endpoint#586

Merged
benPearce1 merged 5 commits intomainfrom
bp/api-command
Apr 8, 2026
Merged

feat:added api command to support a GET request against any octopus api endpoint#586
benPearce1 merged 5 commits intomainfrom
bp/api-command

Conversation

@benPearce1
Copy link
Copy Markdown
Contributor

@benPearce1 benPearce1 commented Apr 6, 2026

Adds a new command: api

Will allow supporting OIDC login via the login command to access any endpoint URL from either Github or Octopus task.
Only supports GET at the moment, can easily be expanded to support POST/PUT later

> octopus api /api/spaces/Spaces-1/tenants/Tenants-1

{
  "Id": "Tenants-1",
  "Name": "eyore",
  "TenantTags": [
    "tags/all"
  ],
  "CustomFields": [],
  "ProjectEnvironments": {
    "Projects-21": [
      "Environments-2"
    ]
  },
  "SpaceId": "Spaces-1",
  "ClonedFromTenantId": null,
  "Description": "",
  "Slug": "eyore",
  "IsDisabled": false,
  "Icon": null,
  "Links": {
    "Self": "/api/Spaces-1/tenants/Tenants-1",
    "Variables": "/api/Spaces-1/tenants/Tenants-1/variables",
    "Web": "/app#/Spaces-1/tenants/Tenants-1",
    "Logo": "/api/Spaces-1/tenants/Tenants-1/logo?cb=0.0.0-local"
  }
}
> octopus api /api/spaces/Spaces-1/tenants/Tenants-1 | jq -r '.Name'
eyore

error handling:

> octopus api /api/spaces/Spaces-1/tenants/Tenants-11
{
  "ErrorMessage": "Resource is not found or it doesn't exist in the current space context. Please contact your administrator for more information."

> echo $? 
1

@benPearce1 benPearce1 merged commit 8938780 into main Apr 8, 2026
3 checks passed
@benPearce1 benPearce1 deleted the bp/api-command branch April 8, 2026 06:46
benPearce1 pushed a commit that referenced this pull request Apr 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.21.0](v2.20.1...v2.21.0)
(2026-04-08)


### Features

* Add --runbook-tag flag to run multiple runbooks by tag
([#576](#576))
([7eb348a](7eb348a))
* Add support for target tag sets with --tag flag
([#579](#579))
([f2871d1](f2871d1))
* added api command to support a GET request against any octopus api
endpoint ([#586](#586))
([8938780](8938780))
* service message flag support
([#574](#574))
([e1ccf99](e1ccf99))
* Support custom AWS region for accounts
([#581](#581))
([a22dd0f](a22dd0f))


### Bug Fixes

* extended automation command to include Space
([#587](#587))
([9c835d1](9c835d1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants