Not able to list the teams in concourse, using API /api/v1/teams


arutsudar.a95@...
 

I am using concourse v4.2.1 deployed using bosh on AWS.

When I hit the API endpoint /api/v1/info (in Postman, with Basic auth), I am able to get the response as below

{
    "version": "4.2.1",
    "worker_version": "2.1"
}

When I try to hit the API endpoint /api/v1/teams (in Postman, with Basic auth), I am getting Status 200 OK with an empty response like below.

[]

I am able to see the teams using fly command or also in the web UI, but not through API.

  • Should I enable basic authentication for hitting API endpoints of concourse?
  • Why am I not able to list the teams in concourse using the API /api/v1/teams? What am I missing?


Additional Info:

Referred to this concourse-bosh-deployment github repo for deploying concourse.

The sample command used to deploy concourse is given below:

bosh -e boshconcoursedir deploy -d boshconcourse concourse.yml \
  -l ../versions.yml \
  --vars-store cluster-creds.yml  \
  -o operations/static-web.yml  \
  --var web_ip=<<REDACTED>>   \
  --var network_name=default  \
  --var web_vm_type=<<REDACTED>>  \
  --var db_vm_type=<<REDACTED>>   \
  --var db_persistent_disk_type=<<REDACTED>> \
   --var worker_vm_type=<<REDACTED>> \
    --var deployment_name=boshconcourse \
    --var external_url=https://<<REDACTED>> \
    -o operations/add-local-users.yml \
    --var main_team_local_users=[admin] \
    --var add_local_users=[admin:<<REDACTED>>,myid@...:<<REDACTED>>]

Today I added the below line to the deployment command and deployed again, and still failed to get the teams from the API

  -o operations/basic-auth.yml \

After logging in as admin in fly, I am able to list the teams as below.

fly -t admin login -c https://something.com -u admin -p <<REDACTED>>
logging in to team 'main'


target saved

fly -t admin teams
name
team-1 
team-2
main 

I am not sure if this is the right place to ask this issue. Sorry if it is not. (Also posted a similar question in StackOverflow). Kindly assist me in resolving this issue.

Regards,
Arut


Daniel Jones
 

Hi Aratsudar,

A better place to look for help would be the Concourse forums: https://discuss.concourse-ci.org/

You may also like to consider Control Tower if you want a simpler way to deploy Concourse via BOSH: https://github.com/EngineerBetter/control-tower

Regards,
Daniel 'Deejay' Jones - CTO
+44 (0)79 8000 9153
EngineerBetter Ltd - More than cloud platform specialists


On Wed, 19 Feb 2020 at 08:49, <arutsudar.a95@...> wrote:

I am using concourse v4.2.1 deployed using bosh on AWS.

When I hit the API endpoint /api/v1/info (in Postman, with Basic auth), I am able to get the response as below

{
    "version": "4.2.1",
    "worker_version": "2.1"
}

When I try to hit the API endpoint /api/v1/teams (in Postman, with Basic auth), I am getting Status 200 OK with an empty response like below.

[]

I am able to see the teams using fly command or also in the web UI, but not through API.

  • Should I enable basic authentication for hitting API endpoints of concourse?
  • Why am I not able to list the teams in concourse using the API /api/v1/teams? What am I missing?


Additional Info:

Referred to this concourse-bosh-deployment github repo for deploying concourse.

The sample command used to deploy concourse is given below:

bosh -e boshconcoursedir deploy -d boshconcourse concourse.yml \
  -l ../versions.yml \
  --vars-store cluster-creds.yml  \
  -o operations/static-web.yml  \
  --var web_ip=<<REDACTED>>   \
  --var network_name=default  \
  --var web_vm_type=<<REDACTED>>  \
  --var db_vm_type=<<REDACTED>>   \
  --var db_persistent_disk_type=<<REDACTED>> \
   --var worker_vm_type=<<REDACTED>> \
    --var deployment_name=boshconcourse \
    --var external_url=https://<<REDACTED>> \
    -o operations/add-local-users.yml \
    --var main_team_local_users=[admin] \
    --var add_local_users=[admin:<<REDACTED>>,myid@...:<<REDACTED>>]

Today I added the below line to the deployment command and deployed again, and still failed to get the teams from the API

  -o operations/basic-auth.yml \

After logging in as admin in fly, I am able to list the teams as below.

fly -t admin login -c https://something.com -u admin -p <<REDACTED>>
logging in to team 'main'


target saved

fly -t admin teams
name
team-1 
team-2
main 

I am not sure if this is the right place to ask this issue. Sorry if it is not. (Also posted a similar question in StackOverflow). Kindly assist me in resolving this issue.

Regards,
Arut


arutsudar.a95@...
 

Hi Daniel,

Thank you for your suggestions.

Regards,
Arutsudar