Docs Navigation

Api v2 Projects

Stability: prototype

  1. List projects in an organization
  2. List project added to a team
  3. List projects for a secret
  4. Create a project in an organization
  5. Add project to a team
  6. Remove project from a team

List projects in an organization

GET /orgs/{org_username}/projects
Response
HTTP status: 200

[
  {
    "id": "86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5",
    "name": "elixir-lang",
    "users_url": "https://api.semaphoreci.com/v2/projects/86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5/users",
    "secrets_url": "https://api.semaphoreci.com/v2/projects/86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5/secrets",
    "updated_at": "2017-06-10 16:59:51 +0200",
    "created_at": "2017-06-10 16:59:51 +0200"
  }
]

List project added to a team

GET /teams/{team_id}/projects
Response
HTTP status: 200

[
  {
    "id": "86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5",
    "name": "elixir-lang",
    "users_url": "https://api.semaphoreci.com/v2/projects/86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5/users",
    "secrets_url": "https://api.semaphoreci.com/v2/projects/86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5/secrets",
    "updated_at": "2017-06-10 16:59:51 +0200",
    "created_at": "2017-06-10 16:59:51 +0200"
  }
]

List projects for a secret

GET /secrets/{secret_id}/projects
Response
HTTP status: 200

[
  {
    "id": "86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5",
    "name": "elixir-lang",
    "users_url": "https://api.semaphoreci.com/v2/projects/86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5/users",
    "secrets_url": "https://api.semaphoreci.com/v2/projects/86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5/secrets",
    "updated_at": "2017-06-10 16:59:51 +0200",
    "created_at": "2017-06-10 16:59:51 +0200"
  }
]

Create a project in an organization

Only organization admin can create new projects.

POST /orgs/{org_username}/projects
Request
Name Type Description
name string Required. Name of the project on Semaphore
repo_name string Required. Name of the repository on GitHub or BitBucket
repo_owner string Required. Name of the repository owner on GitHub or BitBucket
repo_provider string Required. Repository Host
one of: (github, bitbucket)
Response
HTTP status: 200

{
  "id": "86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5",
  "name": "elixir-lang",
  "users_url": "https://api.semaphoreci.com/v2/projects/86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5/users",
  "secrets_url": "https://api.semaphoreci.com/v2/projects/86e78b7e-2f9c-45a7-9939-ec2c9f6f64b5/secrets",
  "updated_at": "2017-06-10 16:59:51 +0200",
  "created_at": "2017-06-10 16:59:51 +0200"
}

Add project to a team

POST /teams/{team_id}/projects/{project_id}
Response
HTTP status: 204

Remove project from a team

DELETE /teams/{team_id}/projects/{project_id}
Response
HTTP status: 204

Semaphore Docs are open source — Edit on GitHub

Newsletter

Occasional lightweight product and blog updates. Unsubscribe at any time.

2009-2017 © Rendered Text. All rights reserved. Terms of Service, Privacy policy, Security.