Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

This API method will not create a document of type File in Documents. It is just the first step for the process of creating such a document. See Creating a new document or folder section.

Request URL

The request URL takes the following form:
POST <ROOT>/rest/stonikbyte-documents-api/1.0/temporary-attachment?filename={fileName}&projectId=(projectID}&atl_token={atlToken}

Parameters

Parameter

Description

filename

The name of the file attached.

projectId

The id of the Jira project where the document will be created

atl_token

The upload token. To obtain the token, see Obtaining the Upload Tokensection

...

Also, the form-data content of the request must contain as binary data the file to be uploaded.

A successful response

An HTTP 201(Created) status response indicates a successful request. The result in JSON format will contain the ID of the temporary attached file that you can use to create a new document of type File. SeeCreating a new document or folder section.

Code Block
languagejson
{
  "name": "myfile.txt",
  "id": "7214177218780006431"
}

Error Response

If the REST call fails, the service returns one of the following HTTP statuses:

...