Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Latest commit

 

History

History
248 lines (176 loc) · 14.1 KB

ProjectBriefsApi.md

File metadata and controls

248 lines (176 loc) · 14.1 KB

Asana.ProjectBriefsApi

All URIs are relative to https://app.asana.com/api/1.0

Method HTTP request Description
createProjectBrief POST /projects/{project_gid}/project_briefs Create a project brief
deleteProjectBrief DELETE /project_briefs/{project_brief_gid} Delete a project brief
getProjectBrief GET /project_briefs/{project_brief_gid} Get a project brief
updateProjectBrief PUT /project_briefs/{project_brief_gid} Update a project brief

createProjectBrief

GetProjectBrief200Response createProjectBrief(projectGid, updateProjectBriefRequest, opts)

Create a project brief

Creates a new project brief. Returns the full record of the newly created project brief.

Example

import Asana from 'asana';
let defaultClient = Asana.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications['personalAccessToken'];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new Asana.ProjectBriefsApi();
let projectGid = 1331; // String | Globally unique identifier for the project.
let updateProjectBriefRequest = new Asana.UpdateProjectBriefRequest(); // UpdateProjectBriefRequest | The project brief to create.
let opts = {
  'optPretty': true, // Boolean | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
  'optFields': ["followers","assignee"] // [String] | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
};
apiInstance.createProjectBrief(projectGid, updateProjectBriefRequest, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectGid String Globally unique identifier for the project.
updateProjectBriefRequest UpdateProjectBriefRequest The project brief to create.
optPretty Boolean Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. [optional]
optFields [String] Defines fields to return. Some requests return compact representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. [optional]

Return type

GetProjectBrief200Response

Authorization

oauth2, personalAccessToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteProjectBrief

DeleteAttachment200Response deleteProjectBrief(projectBriefGid, opts)

Delete a project brief

Deletes a specific, existing project brief. Returns an empty data record.

Example

import Asana from 'asana';
let defaultClient = Asana.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications['personalAccessToken'];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new Asana.ProjectBriefsApi();
let projectBriefGid = 12345; // String | Globally unique identifier for the project brief.
let opts = {
  'optPretty': true, // Boolean | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
  'optFields': ["followers","assignee"] // [String] | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
};
apiInstance.deleteProjectBrief(projectBriefGid, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectBriefGid String Globally unique identifier for the project brief.
optPretty Boolean Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. [optional]
optFields [String] Defines fields to return. Some requests return compact representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. [optional]

Return type

DeleteAttachment200Response

Authorization

oauth2, personalAccessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getProjectBrief

GetProjectBrief200Response getProjectBrief(projectBriefGid, opts)

Get a project brief

Get the full record for a project brief.

Example

import Asana from 'asana';
let defaultClient = Asana.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications['personalAccessToken'];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new Asana.ProjectBriefsApi();
let projectBriefGid = 12345; // String | Globally unique identifier for the project brief.
let opts = {
  'optPretty': true, // Boolean | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
  'optFields': ["followers","assignee"] // [String] | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
};
apiInstance.getProjectBrief(projectBriefGid, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectBriefGid String Globally unique identifier for the project brief.
optPretty Boolean Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. [optional]
optFields [String] Defines fields to return. Some requests return compact representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. [optional]

Return type

GetProjectBrief200Response

Authorization

oauth2, personalAccessToken

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updateProjectBrief

GetProjectBrief200Response updateProjectBrief(projectBriefGid, updateProjectBriefRequest, opts)

Update a project brief

An existing project brief can be updated by making a PUT request on the URL for that project brief. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. Returns the complete updated project brief record.

Example

import Asana from 'asana';
let defaultClient = Asana.ApiClient.instance;
// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';
// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications['personalAccessToken'];
personalAccessToken.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new Asana.ProjectBriefsApi();
let projectBriefGid = 12345; // String | Globally unique identifier for the project brief.
let updateProjectBriefRequest = new Asana.UpdateProjectBriefRequest(); // UpdateProjectBriefRequest | The updated fields for the project brief.
let opts = {
  'optPretty': true, // Boolean | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
  'optFields': ["followers","assignee"] // [String] | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.
};
apiInstance.updateProjectBrief(projectBriefGid, updateProjectBriefRequest, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectBriefGid String Globally unique identifier for the project brief.
updateProjectBriefRequest UpdateProjectBriefRequest The updated fields for the project brief.
optPretty Boolean Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. [optional]
optFields [String] Defines fields to return. Some requests return compact representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. [optional]

Return type

GetProjectBrief200Response

Authorization

oauth2, personalAccessToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json