### JSON-API error response example Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Example error response following the JSON-API specification. Contains fields: id, status, code, title, detail, and path. The status is the HTTP status code as a string. ```json { "errors": [ { "status": 404, "code": "not_found", "title": "Resource not found", "detail": "HolaSpirit\\Organization:Organization object not found." } ] } ``` -------------------------------- ### Example response with job id Source: https://github.com/holaspirit/holaspirit-docs/blob/master/download-export.md Shows the JSON response format from the export request. The `id` field is required for checking job status and downloading the file. ```json { "data": { "id": "5f17dd3c956935687627b656", "status": "current", "jobType": "export_spreadsheet", [...] } } ``` -------------------------------- ### Form error response example Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Example form error response with status code 400. Each error includes a path to the relevant attribute. The format follows the same structure as other errors. ```json { "errors": [ { "status": "400", "code": "required", "title": "This value should not be blank.", "detail": "This value should not be blank.", "path": "organization" }, { "status": "400", "code": "required", "title": "This value should not be blank.", "detail": "This value should not be blank.", "path": "email" }, { "status": "400", "code": "required", "title": "This value should not be blank.", "detail": "This value should not be blank.", "path": "password" } ] } ``` -------------------------------- ### CURL example with email and password Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Use this CURL command to obtain an access token by providing client_id, client_secret, grant_type=password, username, and password. The client_secret is not required for a public app. Replace the **** placeholders with actual values. ```bash curl 'https://app.holaspirit.com/oauth/v2/token' \ --data-raw 'client_id=****&client_secret=****&grant_type=password&username=****&password=****' ``` -------------------------------- ### GET /api/export/organizations/{organization_id}/jobs/{job_id}/download Source: https://github.com/holaspirit/holaspirit-docs/blob/master/download-export.md Downloads the exported file once the job is complete. Use the job ID from the previous steps. ```APIDOC ## [GET] /api/export/organizations/{organization_id}/jobs/{job_id}/download ### Description Downloads the exported file once the job is complete. Use the job ID from the previous steps. ### Method GET ### Endpoint `https://app.holaspirit.com/api/export/organizations/{organization_id}/jobs/{job_id}/download` ### Parameters #### Path Parameters - **organization_id** (string) - Required - The ID of the organization. - **job_id** (string) - Required - The ID of the export job. ``` -------------------------------- ### GET request to download export file Source: https://github.com/holaspirit/holaspirit-docs/blob/master/download-export.md Downloads the exported file using the job id from Steps 1 and 2. This is the final step after the job status is `done`. ```http GET https://app.holaspirit.com/api/export/organizations/{organization_id}/jobs/{job_id}/download ``` -------------------------------- ### CURL GET request with Bearer token Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Sends a GET request to the HolaSpirit API. The Authorization header must include the Bearer token. This works for all request types (GET, POST, PATCH, PUT, DELETE). ```bash curl 'https://app.holaspirit.com/api/organizations/********' \ -H 'Accept: application/json' \ -H 'Content-type: application/json' \ -H 'Authorization: Bearer #################' ``` -------------------------------- ### GET /api/organizations/{organization_id}/jobs/{job_id} Source: https://github.com/holaspirit/holaspirit-docs/blob/master/download-export.md Checks the status of an export job. Use the job ID from the initial export request to poll until the status is `done`. ```APIDOC ## [GET] /api/organizations/{organization_id}/jobs/{job_id} ### Description Checks the status of an export job. Use the job ID from the initial export request to poll until the status is `done`. ### Method GET ### Endpoint `https://app.holaspirit.com/api/organizations/{organization_id}/jobs/{job_id}` ### Parameters #### Path Parameters - **organization_id** (string) - Required - The ID of the organization. - **job_id** (string) - Required - The ID of the export job. ### Response #### Success Response (200) - **status** (string) - Status of the job (e.g., `current`, `done`). ``` -------------------------------- ### GET request to check job status Source: https://github.com/holaspirit/holaspirit-docs/blob/master/download-export.md Checks the status of the export job using the job id from Step 1. Wait until the status is `done` before proceeding; the job is available for 1 week. ```http GET https://app.holaspirit.com/api/organizations/{organization_id}/jobs/{job_id} ``` -------------------------------- ### GET /api/organizations/{organizationId} Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Retrieves an organization by its ID. This endpoint requires authentication via a Bearer token in the Authorization header. ```APIDOC ## [GET] /api/organizations/{organizationId} ### Description Retrieves an organization by its ID. ### Method GET ### Endpoint /api/organizations/{organizationId} ### Parameters #### Path Parameters - **organizationId** (string) - Required - The ID of the organization to retrieve. ### Request Example ``` curl 'https://app.holaspirit.com/api/organizations/********' \ -H 'Accept: application/json' \ -H 'Content-type: application/json' \ -H 'Authorization: Bearer #################' ``` ``` -------------------------------- ### POST request to create spreadsheet export Source: https://github.com/holaspirit/holaspirit-docs/blob/master/download-export.md Initiates an asynchronous export by calling the endpoint with a `tabs=` parameter specifying which tabs to export. The response contains an `id` needed for subsequent steps. ```http POST https://app.holaspirit.com/api/async/organizations/{organization_id}/spreadsheet ``` -------------------------------- ### Webhook members array format for actions, projects, checklists & metrics Source: https://github.com/holaspirit/holaspirit-docs/blob/master/changelog.md Shows the new format for the members field in webhooks for actions, projects, checklists, and metrics, where members are listed inside an array with id, member, and action fields. ```json "members": [ { "id": "5f7139d99b62fd692133406f", "member": "John Doe", "action": "assign" }, { "id": "5f7139d99b62fd6921334070", "member": "Jane Doe", "action": "assign" } ], ``` -------------------------------- ### POST /api/async/organizations/{organization_id}/spreadsheet Source: https://github.com/holaspirit/holaspirit-docs/blob/master/download-export.md Initiates an asynchronous export of organization data to a spreadsheet. Specify the tabs to export using the `tabs` parameter. Returns a job ID for tracking the export. ```APIDOC ## [POST] /api/async/organizations/{organization_id}/spreadsheet ### Description Initiates an asynchronous export of organization data to a spreadsheet. Specify the tabs to export using the `tabs` parameter. Returns a job ID for tracking the export. ### Method POST ### Endpoint `https://app.holaspirit.com/api/async/organizations/{organization_id}/spreadsheet` ### Parameters #### Query Parameters - **tabs** (string) - Required - Comma-separated list of tabs to export (e.g., `role`, `member,assignation,role`). ### Response #### Success Response (200) - **data.id** (string) - The job ID for tracking the export. - **data.status** (string) - Status of the job (e.g., `current`). - **data.jobType** (string) - Type of job (e.g., `export_spreadsheet`). ### Request Example ``` POST https://app.holaspirit.com/api/async/organizations/{organization_id}/spreadsheet?tabs=role ``` ### Response Example ```json { "data": { "id": "5f17dd3c956935687627b656", "status": "current", "jobType": "export_spreadsheet", [...] } } ``` ``` -------------------------------- ### POST /oauth/v2/token Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Obtain an access token for read-write access. Supports password and refresh_token grant types. ```APIDOC ## [POST] /oauth/v2/token ### Description Obtain an access token for read-write access. Supports password and refresh_token grant types. ### Method POST ### Endpoint https://app.holaspirit.com/oauth/v2/token ### Parameters #### Request Body (password grant) - **client_id** (string) - Required - OAuth2 Client ID - **client_secret** (string) - Optional - The OAuth2 Client secret - **grant_type** (string) - Required - "password" - **username** (string) - Required - The Email - **password** (string) - Required - The Password - **timezone** (string) - Optional - The Timezone (e.g.: "+02:00") #### Request Body (refresh_token grant) - **client_id** (string) - Required - OAuth2 Client ID - **client_secret** (string) - Optional - OAuth2 Client secret - **grant_type** (string) - Required - "refresh_token" - **refresh_token** (string) - Required - The refresh_token ### Response #### Success Response (200) - **access_token** (string) - Access token for making requests - **expires_in** (integer) - Token expiration time in seconds - **token_type** (string) - Token type (bearer) - **scope** (null) - Scope - **refresh_token** (string) - Refresh token for obtaining new access tokens ### Request Example ``` curl 'https://app.holaspirit.com/oauth/v2/token' \ --data-raw 'client_id=****&client_secret=****&grant_type=password&username=****&password=****' ``` #### Response Example ```json { "access_token": "#################", "expires_in": 3600, "token_type": "bearer", "scope": null, "refresh_token": "#################" } ``` #### Error Responses **Incorrect Client ID (status code: 400):** ```json { "error": "invalid_client", "error_description": "The client credentials are invalid" } ``` **Incorrect credentials (status code: 400):** ```json { "error": "invalid_grant", "error_description": "Invalid username and password combination" } ``` ``` -------------------------------- ### Rate limit response headers Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Shows the rate limit headers returned with every API request. The limit is 250 requests per 5 minutes. When x-ratelimit-remaining reaches 0, you receive HTTP 429 Too Many Requests until the reset period (x-ratelimit-reset in seconds) passes. ```http x-ratelimit-limit: 250 x-ratelimit-remaining: 248 x-ratelimit-reset: 293 ``` -------------------------------- ### CURL POST request to create a custom field Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Sends a POST request to create a custom field on an organization. The request body specifies the field name, type, and target. Requires the Bearer token in the Authorization header. ```bash curl 'https://holon.holaspirit.com/api/organizations/********/custom-fields' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer #################' \ --data-raw '{"name":"testCF","customFieldType":"text","applyTo":"role"}' ``` -------------------------------- ### Incorrect credentials error response for revoke Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Returned with status code 401 when authentication fails during token revocation. The error field is 'access_denied'. ```json { "error": "access_denied", "error_description": "OAuth2 authentication required" } ``` -------------------------------- ### Incorrect credentials error response Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Returned with status code 400 when the username and password combination is invalid. The error field is 'invalid_grant'. ```json { "error": "invalid_grant", "error_description": "Invalid username and password combination" } ``` -------------------------------- ### POST /oauth/v2/revoke Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Revoke an access token. Requires an Authorization header with the bearer token. ```APIDOC ## [POST] /oauth/v2/revoke ### Description Revoke an access token. Requires an Authorization header with the bearer token. ### Method POST ### Endpoint https://app.holaspirit.com/oauth/v2/revoke ### Headers - **Authorization** (string) - Required - Bearer token ### Parameters #### Request Body - **token** (string) - Required - Current token ID ### Response #### Success Response (200) Empty response #### Error Responses **Missing token ID (status code: 400):** ```json { "error": "bad_request", "error_description": "Missing Token" } ``` **Incorrect credentials (status code: 401):** ```json { "error": "access_denied", "error_description": "OAuth2 authentication required" } ``` ``` -------------------------------- ### POST /api/organizations/{organizationId}/custom-fields Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Creates a custom field for a specific organization. The request body must include the custom field's name, type, and the entity it applies to. ```APIDOC ## [POST] /api/organizations/{organizationId}/custom-fields ### Description Creates a custom field for a specific organization. ### Method POST ### Endpoint /api/organizations/{organizationId}/custom-fields ### Parameters #### Path Parameters - **organizationId** (string) - Required - The ID of the organization. #### Request Body - **name** (string) - Required - The name of the custom field. - **customFieldType** (string) - Required - The type of the custom field (e.g., "text"). - **applyTo** (string) - Required - The entity the custom field applies to (e.g., "role"). ### Request Example ``` curl 'https://holon.holaspirit.com/api/organizations/********/custom-fields' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer #################' \ --data-raw '{"name":"testCF","customFieldType":"text","applyTo":"role"}' ``` ``` -------------------------------- ### OAuth2 token response Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md The response from the token endpoint includes an access_token, expires_in (3600 seconds), token_type, scope, and refresh_token. The refresh_token can be used once to obtain a new access_token. ```json { "access_token": "#################", "expires_in": 3600, "token_type": "bearer", "scope": null, "refresh_token": "#################" } ``` -------------------------------- ### Missing token ID error response Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Returned with status code 400 when the token parameter is missing during token revocation. The error field is 'bad_request'. ```json { "error": "bad_request", "error_description": "Missing Token" } ``` -------------------------------- ### Incorrect Client ID error response Source: https://github.com/holaspirit/holaspirit-docs/blob/master/api.md Returned with status code 400 when the client_id is invalid. The error field is 'invalid_client'. ```json { "error": "invalid_client", "error_description": "The client credentials are invalid" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.