Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

Introduction

This document provides detailed information on the external API endpoints for managing companies and projects. The API uses an API key for authentication, which should be generated through EVM settings.

Authentication

All API requests must include an Authorization header with a valid API key. The API key can be generated through the EVM settings.

Generating API Key

  1. Navigate to EVM settings -> API.

  2. Generate the API key.

  3. Use the API key in the Authorization header for all requests.

Base URL

The base URL for all endpoints is https://pa.aneto-apps.com.

Error Codes

  • 403 Unauthorized: If the Authorization header is missing.

  • 403 Forbidden: If the API key is invalid or does not have the necessary permissions.

  • 400 Bad Request: If the request data is invalid.

Endpoints

1. Get Companies

Endpoint:

  • GET /external/api/v1/companies

Description: Retrieves a paginated list of companies.

Headers:

  • Authorization: Bearer {API_KEY}

Query Parameters:

  • page (optional, integer): The page number for pagination. Default is 1.

  • perPage (optional, integer): The number of companies per page. Default is 10.

Response:

{
    "data": [
        {
            "id": 1,
            "name": "Company A"
        },
        {
            "id": 2,
            "name": "Company B"
        }
    ],
    "meta": {
        "page": 1,
        "perPage": 10,
        "total": 20
    }
}

Error Responses:

  • 403 Forbidden: If the API key is invalid or does not have the necessary permissions.

2. Create Project

Endpoint:

  • POST /external/api/v1/projects

Description: Creates a new project.

Headers:

  • Authorization: Bearer {API_KEY}

  • Content-Type: application/json

Request Body:

{
    "company_id*": 1,
    "name*": "New Project",
    "duration_format*": "hours|days",
    "money_format*": "default|thousands|millions",
    "start_date": "2024-07-01",
    "due_date": "2024-12-31",
    "jira_jql*": "project = TEST",
    "status*": "Proposal|Initiating|Planning|Ready to Start|Executing|On Hold|Blocked|QA Validation|QA Failed|PO / Client validation|Done|Canceled"
}

Response:

201 Created:
{
    "data": {
        "id": 1,
        "companyId": 1,
        "name": "New Project",
        "durationFormat": "days",
        "moneyFormat": "default",
        "startDate": "2024-07-01",
        "dueDate": "2024-12-31",
        "jiraJql": "project = TEST",
        "status": 4,
	   “statueName”: “Executing”
    }
}

Error Responses:

  • 400 Bad Request: If the request data is invalid.

  • 403 Forbidden: If the API key is invalid or does not have the necessary permissions.

  • No labels