Projects

Projects are the top level entity in GroundControl. At this moment since API keys are scoped to projects, you cannot create projects through the API, but you can retrieve the information of the project the API belongs to or update it.


Endpoints

GET/projects/{projectId}

Retrieve a project

Get a project

Path parameters

  • Name
    projectId
    Type
    string
    Description
    Required The project id

Request

GET
/projects/{projectId}
const options = {method: 'GET', headers: {Authorization: 'Bearer YOUR_API_KEY'}};

fetch('https://api.groundcontrol.sh/projects/P091PL4M90ZWQUZ0', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

Response

{
  "id": "P091PL4M90ZWQUZ0",
  "name": "Acme Inc.",
  "githubInstallationId": "123456",
  "customerId": "cus_123456"
}

PATCH/projects/{projectId}

Update a project

Update a project

Path parameters

  • Name
    projectId
    Type
    string
    Description
    Required The project id

Request body

  • Name
    name
    Type
    string
    Description
    Project name

Request

PATCH
/projects/{projectId}
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'},
  body: '{"name":"example"}'
};

fetch('https://api.groundcontrol.sh/projects/P091PL4M90ZWQUZ0', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

Response

{
  "id": "P091PL4M90ZWQUZ0",
  "name": "Acme Inc.",
  "githubInstallationId": "123456",
  "customerId": "cus_123456"
}