Where to locate Task API?

Hi  ,

Greetings.

I am in the process of developing an application using the SugarCRM APIs.

I have encountered some issues while trying to locate the task API within the documentation, specifically for tasks' creation, updating, and viewing.

Despite this, I attempted to manipulate some of the endpoints, which yielded positive results.

I have shared the endpoints that I am currently utilizing:

Creating a task:

curl --location --request POST 'https://account_url/rest/v11_21/Tasks' \
--header 'OAuth-Token: auth_token' \
--header 'Content-Type: application/json' \
--data '{
    "name": "create_sample_task",
    "status": "Completed"
}'


Viewing a task:
curl --location --request GET 'https://account_url/rest/v11_21/Tasks/task_id' \
--header 'OAuth-Token: auth_token' \
--header 'Content-Type: application/json' \


Updating a task:
curl --location --request PUT 'https://account_url/rest/v11_21/Tasks/task_id' \
--header 'OAuth-Token: auth_token' \
--header 'Content-Type: application/json' \
--data '{
    "name": "update_sample_task",
    "status": "Completed"
}'


Could you please confirm if the endpoints I am using are correct? If not, I would greatly appreciate your guidance in steering me towards the correct ones.

I am looking forward to your prompt response.

Parents
  • I tried this (version v10 to v11_21):

    Create Task:

    curl --location 'http://server/sugardev1300/rest/v10/Tasks' \
    --header 'OAuth-Token: abdb58fa-bdea-428f-b22d-ed9477c45c4b' \
    --header 'Content-Type: application/json' \
    --data '{
    "name":"Postman Task #123", 
    "status":"Completed" 
    }'

    Update Task:
    curl --location --request PUT 'http://server/sugardev1300/rest/v10/Tasks/bbff02f2-4b3c-11ee-978c-54ee7593936c' \
    --header 'OAuth-Token: abdb58fa-bdea-428f-b22d-ed9477c45c4b' \
    --header 'Content-Type: application/json' \
    --data '{
    "name":"Postman Task #123", 
    "status":"Completed" 
    }'
    Read Task:
    curl --location --request GET 'http://server/sugardev1300/rest/v10/Tasks/bbff02f2-4b3c-11ee-978c-54ee7593936c' \
    --header 'OAuth-Token: abdb58fa-bdea-428f-b22d-ed9477c45c4b' \
    --header 'Content-Type: application/json' \
    
    and all worked fine.
Reply
  • I tried this (version v10 to v11_21):

    Create Task:

    curl --location 'http://server/sugardev1300/rest/v10/Tasks' \
    --header 'OAuth-Token: abdb58fa-bdea-428f-b22d-ed9477c45c4b' \
    --header 'Content-Type: application/json' \
    --data '{
    "name":"Postman Task #123", 
    "status":"Completed" 
    }'

    Update Task:
    curl --location --request PUT 'http://server/sugardev1300/rest/v10/Tasks/bbff02f2-4b3c-11ee-978c-54ee7593936c' \
    --header 'OAuth-Token: abdb58fa-bdea-428f-b22d-ed9477c45c4b' \
    --header 'Content-Type: application/json' \
    --data '{
    "name":"Postman Task #123", 
    "status":"Completed" 
    }'
    Read Task:
    curl --location --request GET 'http://server/sugardev1300/rest/v10/Tasks/bbff02f2-4b3c-11ee-978c-54ee7593936c' \
    --header 'OAuth-Token: abdb58fa-bdea-428f-b22d-ed9477c45c4b' \
    --header 'Content-Type: application/json' \
    
    and all worked fine.
Children
No Data