Create Service
This API endpoint enables creating of a new service by providing the name and team_id in the request body. This is useful for organizations or teams that need to add new services to their system.

Common use cases:

  • Create a new service: If a new feature or product line is being introduced within a team, this API can be used to register it as a new service.
  • Infrastructure scaling: As organizations grow, they can easily expand their services to handle more operations or customer demands.


HTTP Method: POST


Authorization: Bearer YOUR_TOKEN
Request Body Parameters
  • name string
    The name of the service.
    Example: 'ServiceName'
  • team_id string
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/service';
const data = {
  name: 'ServiceName',
  team_id: '39ed7fbd-200b-41eb-8467-a91f0809e802'
};

axios.post(url, data, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).