Retrieves the specified service
Example response
curl -i -X GET \ 'https://app.harness.io/v1/orgs/{org}/projects/{project}/services/{service}' \ -H 'Harness-Account: string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "service": {
- "account": "sample_account",
- "identifier": "example_service",
- "org": "sample_organization",
- "project": "sample_project",
- "name": "Example_service",
- "description": "This is a example service",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "service:\n name: \"Example_service\"\n identifier: \"example_service\"\n tags: {}\n"
}, - "created": 1234567890,
- "updated": 1234567890
}
Updates the specified service
Update Service request body
Example response
{- "identifier": "example_service",
- "name": "Example_service",
- "description": "This is a example service",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "service:\n name: \"Example_service\"\n identifier: \"example_service\"\n tags: {}\n"
}
{- "service": {
- "account": "sample_account",
- "identifier": "example_service",
- "org": "sample_organization",
- "project": "sample_project",
- "name": "Example_service",
- "description": "This is a example service",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "service:\n name: \"Example_service\"\n identifier: \"example_service\"\n tags: {}\n"
}, - "created": 1234567890,
- "updated": 1234567890
}
Deletes the requested service.
Example response
curl -i -X DELETE \ 'https://app.harness.io/v1/orgs/{org}/projects/{project}/services/{service}?forceDelete=false' \ -H 'Harness-Account: string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
{- "service": {
- "account": "sample_account",
- "identifier": "example_service",
- "org": "sample_organization",
- "project": "sample_project",
- "name": "Example_service",
- "description": "This is a example service",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "service:\n name: \"Example_service\"\n identifier: \"example_service\"\n tags: {}\n"
}, - "created": 1234567890,
- "updated": 1234567890
}
Returns a list of the services for which you have view permissions in the given project.
Example response
curl -i -X GET \ 'https://app.harness.io/v1/orgs/{org}/projects/{project}/services?page=0&limit=20&search_term=string&service_ids=string&sort=name&is_access_list=true&deployment_type=Kubernetes&git_ops_enabled=true&order=ASC' \ -H 'Harness-Account: string' \ -H 'x-api-key: YOUR_API_KEY_HERE'
[- {
- "service": {
- "account": "sample_account",
- "identifier": "example_service",
- "org": "sample_organization",
- "project": "sample_project",
- "name": "Example_service",
- "description": "This is a example service",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "service:\n name: \"Example_service\"\n identifier: \"example_service\"\n tags: {}\n"
}, - "created": 1234567890,
- "updated": 1234567890
}
]
Creates a service
Create Service request body
Example response
{- "identifier": "example_service",
- "name": "Example_service",
- "description": "This is a example service",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "service:\n name: \"Example_service\"\n identifier: \"example_service\"\n tags: {}\n"
}
{- "service": {
- "account": "sample_account",
- "identifier": "example_service",
- "org": "sample_organization",
- "project": "sample_project",
- "name": "Example_service",
- "description": "This is a example service",
- "tags": {
- "example-tag-1": "example-tag-1-value",
- "example-tag-2": "example-tag-2-value"
}, - "yaml": "service:\n name: \"Example_service\"\n identifier: \"example_service\"\n tags: {}\n"
}, - "created": 1234567890,
- "updated": 1234567890
}