NAV Navigation
Shell HTTP JavaScript Node.JS Ruby Python Java Go

Vault v0.3.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The Vault API manages secure content files and document storage for other Apiture APIs and application use. Documents which may be stored in Vault include Terms and Conditions, privacy statements, check images, statements, images/documents required for an account application, etc. Clients may upload and download files with this API, or search for files by date or type or role. Files may be organized into hierarchical folders. Each file has a JSON representation file descriptor which includes the attributes (metadata) of the file (the name, type, size, _links, etc.), and a content resource which accesses the text or binary content of the file. The content URI is available via the apiture:content link in the file descriptor. The _links of a file or folder include an apiture:folder link to its containing folder. Each folder has apiture:files and apiture:children links to its directly contained files and subfolders, respectively.

To upload a file, first POST a request to the /uploads path (the createUpload operation) containing file descriptor(s) to be uploaded. When uploading a new file, the caller may specify a desired target folder by setting the apiture:folder link within the request's _links. The upload tracker response from the upload operation contains an array of items, one for each file to upload. Each item in the array contains an apiture:uploadUrl link, which is an upload URL for the corresponding file. The client should next PUT the file(s) content to the upload URLs to upload the files' contents. The upload is done when the upload resource state is completed or failed. The upload resource will contain the file descriptor resources in the items array within the _embedded object; each file will include a self link to the corresponding file resource.

After a file has been created, the file resource contains links to its containing folder, the ../public share URI, and the content URI for downloading the file's content.

For files which reside in folders with revisions enabled, updating a file's content creates a new revision of the file. The revisions are available from the file's /files/{fileId}/revisions collection.

Download OpenAPI Definition (YAML)

Base URLs:

Terms of service

Email: Apiture Web: Apiture

License: Pending.

API

Endpoints which describe this API.

getApi

Code samples

# You can also use wget
curl -X GET /vault/ \
  -H 'Accept: application/hal+json'

GET /vault/ HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/vault/',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/vault/',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/vault/', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Top-level resources and operations in this API

GET /

Return links to the top-level resources and operations in this API. Links in the root response may include:

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "id": "apiName",
  "name": "API name",
  "apiVersion": "0.0.1-SNAPSHOT",
  "_profile": "https://api.apiture.com/schemas/apiRoot/v1.0.0/profile.json",
  "_links": {}
}

Responses

StatusDescription
200 OK
OK
Schema: root

getApiDoc

Code samples

# You can also use wget
curl -X GET /vault/apiDoc \
  -H 'Accept: application/json'

GET /vault/apiDoc HTTP/1.1

Accept: application/json

var headers = {
  'Accept':'application/json'

};

$.ajax({
  url: '/vault/apiDoc',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json'

};

fetch('/vault/apiDoc',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get '/vault/apiDoc',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('/vault/apiDoc', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/apiDoc");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/apiDoc", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Return API definition document

GET /apiDoc

Return the OpenAPI document that describes this API.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{}

Responses

StatusDescription
200 OK
OK
Schema: Inline

Response Schema

Upload

Requests to upload new files into the file vault.

getUploads

Code samples

# You can also use wget
curl -X GET /vault/uploads \
  -H 'Accept: application/hal+json'

GET /vault/uploads HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/uploads',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/vault/uploads',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/vault/uploads',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/vault/uploads', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/uploads");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/uploads", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Return a collection of recent and in progress uploads

GET /uploads

Return a paginated sortable filterable searchable collection of uploads. The links in the response include pagination links. Upload resources expire after a while and these resources are automatically deleted.

Parameters

Parameter Description
start
(query)
integer(int64)
The zero-based index of the first upload in this page. The default, 0, represents the first page of the collection.
limit
(query)
integer(int32)
The maximum number of upload representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "https://api.apiture.com/schemas/collection/upload/v1.0.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 2,
  "name": "uploads",
  "_links": {
    "self": {
      "href": "/vault/uploads?start=10&limit=10"
    },
    "first": {
      "href": "/vault/uploads?start=0&limit=10"
    },
    "next": {
      "href": "/vault/uploads?start=100&limit=100"
    },
    "collection": {
      "href": "/vault/uploads"
    },
    "apiture:myUploads": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "d3a954aa-2027-4e92-b5b0-136bf31b1837",
        "count": 1,
        "name": "files",
        "_embedded": [
          {
            "name": "image1.png",
            "contentType": "image/png"
          },
          {
            "name": "image2.png",
            "contentType": "image/png"
          }
        ],
        "_links": {
          "self": {
            "href": "/vault/uploads/d3a954aa-2027-4e92-b5b0-136bf31b1837"
          }
        }
      },
      {
        "_id": "70ac012a-d66a-4a2a-8286-916dfda25799",
        "count": 1,
        "name": "files",
        "_links": {
          "self": {
            "href": "/vault/uploads/70ac012a-d66a-4a2a-8286-916dfda25799"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: uploads
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

createUpload

Code samples

# You can also use wget
curl -X POST /vault/uploads \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json'

POST /vault/uploads HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/uploads',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "_profile": "https://api.apiture.com/schemas/upload/v1.0.0/profile.json",
  "count": 2,
  "name": "files",
  "_embedded": {
    "items": [
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg"
      },
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg"
      }
    ]
  }
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

fetch('/vault/uploads',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json'
}

result = RestClient.post '/vault/uploads',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json'
}

r = requests.post('/vault/uploads', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/uploads");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/vault/uploads", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Create a new upload

POST /uploads

Create a new file upload tracker. The caller provides a list of one or more files to be uploaded in _embedded.items.

This operation returns a modified upload tracker resource representation which contains embedded file descriptors. Each file descriptor contain the file name, type, etc. and a link named apiture:uploadUrl which points to an upload URL. The client must PUT the file content to those respective URLs to complete the uploads.

The state of the upload tracker shows the upload status. When the state is completes, the files associated with the upload will be in this resource's _embedded object with the name files; that value an array of file descriptor objects.

The target folder in which the file will be stored may be specified in _links using the apiture:folder link relation name.

If there is already a file of the same name in the target folder, the file is renamed by adding or incrementing a unique numeric suffix in parentheses. For example, if tax-summary-2018.pdf already exists, uploading a new document with that name will be renamed tax-summary-2018 (1).pdf; uploading another file will be renamed tax-summary-2018 (2).pdf, and so on.

TODO In the future, this API will also support uploading new revisions of the document and maintaining document revision history.

Body parameter

{
  "_profile": "https://api.apiture.com/schemas/upload/v1.0.0/profile.json",
  "count": 2,
  "name": "files",
  "_embedded": {
    "items": [
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg"
      },
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg"
      }
    ]
  }
}

Parameters

Parameter Description
body
(body)
createUpload (required)
The data necessary to create a new upload.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

201 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "https://api.apiture.com/schemas/upload/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/uploads/0399abed-fd3d-4830-a88b-30f38b8a365c"
    },
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    },
    "items": [
      {
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg",
        "_links": {
          "apiture:uploadUrl": {
            "href": "/some/opaque/upload/url/for/this/file"
          }
        }
      },
      {
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg",
        "_links": {
          "apiture:uploadUrl": {
            "href": "/some/opaque/upload/url/for/this/file"
          }
        }
      }
    ]
  },
  "count": 2,
  "name": "files",
  "state": "pending",
  "expiresAt": "2017-12-23T00:00:00.000Z",
  "maximumFileSizeBytes": 25000000,
  "maximumReqestSizeBytes": 50000000
}

Responses

StatusDescription
201 Created
Created
Schema: upload
202 Accepted
Accepted
Schema: upload
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
201 Location string uri
The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with scheme://host
201 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update the resource.
202 Location string uri
The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with scheme://host
202 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update the resource.

getUpload

Code samples

# You can also use wget
curl -X GET /vault/uploads/{uploadId} \
  -H 'Accept: application/hal+json' \
  -H 'If-None-Match: string'

GET /vault/uploads/{uploadId} HTTP/1.1

Accept: application/hal+json
If-None-Match: string

var headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

$.ajax({
  url: '/vault/uploads/{uploadId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

fetch('/vault/uploads/{uploadId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json',
  'If-None-Match' => 'string'
}

result = RestClient.get '/vault/uploads/{uploadId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json',
  'If-None-Match': 'string'
}

r = requests.get('/vault/uploads/{uploadId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/uploads/{uploadId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        "If-None-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/uploads/{uploadId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch a representation of this upload

GET /uploads/{uploadId}

Return a HAL representation of this upload resource.

Parameters

Parameter Description
uploadId
(path)
string (required)
The unique identifier of this upload. This is an opaque string.
If-None-Match
(header)
string
The entity tag that was returned in the ETag response. If the resource's current entity tag matches, the GET will return 304 (Not Modified) and no response body, else the resource representation will be returned.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* uploadId

If-None-Match

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "https://api.apiture.com/schemas/upload/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/uploads/0399abed-fd3d-4830-a88b-30f38b8a365c"
    },
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    },
    "items": [
      {
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg",
        "_links": {
          "apiture:uploadUrl": {
            "href": "/some/opaque/upload/url/for/this/file"
          }
        }
      },
      {
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg",
        "_links": {
          "apiture:uploadUrl": {
            "href": "/some/opaque/upload/url/for/this/file"
          }
        }
      }
    ]
  },
  "count": 2,
  "name": "files",
  "state": "pending",
  "expiresAt": "2017-12-23T00:00:00.000Z",
  "maximumFileSizeBytes": 25000000,
  "maximumReqestSizeBytes": 50000000
}

Responses

StatusDescription
200 OK
OK
Schema: upload
304 Not Modified
Not Modified. The resource has not been modified since it was last fetched.
404 Not Found
Not Found. There is no such upload resource at the specified {uploadId} The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this upload resource.

deleteUpload

Code samples

# You can also use wget
curl -X DELETE /vault/uploads/{uploadId}

DELETE /vault/uploads/{uploadId} HTTP/1.1


$.ajax({
  url: '/vault/uploads/{uploadId}',
  method: 'delete',

  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

fetch('/vault/uploads/{uploadId}',
{
  method: 'DELETE'

})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

result = RestClient.delete '/vault/uploads/{uploadId}',
  params: {
  }

p JSON.parse(result)

import requests

r = requests.delete('/vault/uploads/{uploadId}', params={

)

print r.json()

URL obj = new URL("/vault/uploads/{uploadId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/vault/uploads/{uploadId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Delete this upload resource

DELETE /uploads/{uploadId}

Delete this upload resource and any resources that are owned by it. Note that deleting an upload does not delete any files that have been uploaded.

Parameters

Parameter Description
uploadId
(path)
string (required)
The unique identifier of this upload. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodDELETE
* URL
* API Key
* Access Token

* uploadId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Responses

StatusDescription
204 No Content
No Content. The resource was deleted successfully.

uploadContent

Code samples

# You can also use wget
curl -X POST /vault/uploads/{uploadId}/content \
  -H 'Content-Type: */*' \
  -H 'Accept: application/hal+json' \
  -H 'Content-Type: string'

POST /vault/uploads/{uploadId}/content HTTP/1.1

Content-Type: */*
Accept: application/hal+json
Content-Type: string

var headers = {
  'Content-Type':'*/*',
  'Accept':'application/hal+json',
  'Content-Type':'string'

};

$.ajax({
  url: '/vault/uploads/{uploadId}/content',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = 'string';
const headers = {
  'Content-Type':'*/*',
  'Accept':'application/hal+json',
  'Content-Type':'string'

};

fetch('/vault/uploads/{uploadId}/content',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => '*/*',
  'Accept' => 'application/hal+json',
  'Content-Type' => 'string'
}

result = RestClient.post '/vault/uploads/{uploadId}/content',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': '*/*',
  'Accept': 'application/hal+json',
  'Content-Type': 'string'
}

r = requests.post('/vault/uploads/{uploadId}/content', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/uploads/{uploadId}/content");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"*/*"},
        "Accept": []string{"application/hal+json"},
        "Content-Type": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/vault/uploads/{uploadId}/content", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Upload the file's raw content to the corresponding file resource.

POST /uploads/{uploadId}/content

Upload the raw content of the file as a stream of bytes. Examples include the binary bytes for an image or PDF document, or the multipart/form-data representation of the file. The Content-Type header (or the Content-Type in the multipart form data) must match the contentType of the file resource. The response is the /files/{fileId} file resource, not the file content. Note: This is a hidden operation which is a proxy for the apiture:uploadUrl link returned when creating a new upload in the createUpload operation. Clients should not assume this URL exists but should instead use the apiture:uploadUrl link that is returned when creating a new upload resource.

If the file is in a folder for which revisions are enable, this will create a new revision of the file; see the getFileRevisions and getFileRevision operations.

Body parameter

string

Parameters

Parameter Description
uploadId
(path)
string (required)
The unique identifier of this upload. This is an opaque string.
Content-Type
(header)
string (required)
The media type describing the file's content type.
body
(body)
string(binary) (required)
The file contents as a stream of bytes.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

* uploadId

* Content-Type

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json",
  "start": 0,
  "limit": 100,
  "count": 2,
  "name": "files",
  "_links": {
    "self": {
      "href": "/vault/files?start=0&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "first": {
      "href": "/vault/files?start=0&limit=10"
    },
    "next": {
      "href": "/vault/files?start=100&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "collection": {
      "href": "/vault/files",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "items": [
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "54867739-eca4-434d-8869-8fe6a6248f55",
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/54867739-eca4-434d-8869-8fe6a6248f55"
          }
        }
      },
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "70955bd8-0bc2-4129-9117-cc7749406cfe",
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/70955bd8-0bc2-4129-9117-cc7749406cfe"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: files
400 Bad Request
Bad Request. The file could not be uploaded. Possible errors are the file is too large, or the file type is not allowed o may be potentially malicious. TODO: define errors with x-apiture-errors
Schema: errorResponse
404 Not Found
Not Found. There is no such file resource at the specified {fileId} or no such file resources for the specified {filter} The _error field in the response will contain details about the request error.
Schema: errorResponse
409 Conflict
Conflict. The Content-Type did not match the contentType of the file resource.
Schema: errorResponse

File

A file (document) in the file vault.

getFiles

Code samples

# You can also use wget
curl -X GET /vault/files \
  -H 'Accept: application/hal+json'

GET /vault/files HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/files',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/vault/files',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/vault/files',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/vault/files', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/files", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Return a collection of files

GET /files

Return a paginated sortable filterable searchable collection of files. The links in the response include pagination links.

Parameters

Parameter Description
start
(query)
integer(int64)
The zero-based index of the first file in this page. The default, 0, represents the first page of the collection.
limit
(query)
integer(int32)
The maximum number of file representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.
folder
(query)
string
Subset the response to resources that reside directly within the specified folder. The value may be a folder ID or a folder URI.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

start

limit

sortBy

filter

q

folder

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json",
  "start": 0,
  "limit": 100,
  "count": 2,
  "name": "files",
  "_links": {
    "self": {
      "href": "/vault/files?start=0&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "first": {
      "href": "/vault/files?start=0&limit=10"
    },
    "next": {
      "href": "/vault/files?start=100&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "collection": {
      "href": "/vault/files",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "items": [
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "54867739-eca4-434d-8869-8fe6a6248f55",
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/54867739-eca4-434d-8869-8fe6a6248f55"
          }
        }
      },
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "70955bd8-0bc2-4129-9117-cc7749406cfe",
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/70955bd8-0bc2-4129-9117-cc7749406cfe"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: files
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

createFile

Code samples

# You can also use wget
curl -X POST /vault/files \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json'

POST /vault/files HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/files',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "name": "avatar.png",
  "contentType": "image/png",
  "description": "My personal avatar",
  "type": "profilePicture",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55"
    }
  }
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

fetch('/vault/files',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json'
}

result = RestClient.post '/vault/files',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json'
}

r = requests.post('/vault/files', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/vault/files", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Create a new file

POST /files

Create a new file in the files collection. This operation is called upon successful completion of an upload operation and associates the file descriptor (name, description, parent folder, etc) with the file contents.

If there is already a file of the same name in the target folder, the file is renamed by adding a unique numeric suffix in parentheses. For example, if tax-summary-2018.pdf already exists, uploading a new document with that name will be renamed tax-summary-2018 (1).pdf.

The file will be placed in the folder specified in the apiture:folder link, which should be derievd from the apiture:folder specified in upload request. If no folder was specified, the file is placed in the user's uploads folder.

Body parameter

{
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "name": "avatar.png",
  "contentType": "image/png",
  "description": "My personal avatar",
  "type": "profilePicture",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55"
    }
  }
}

Parameters

Parameter Description
body
(body)
createFile (required)
The data necessary to create a new file.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

201 Response

{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
      "profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:content": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b/content",
      "type": "images/png"
    },
    "apiture:share": {
      "href": "/vault/content/6b580037-2d4f-4b91-bb3f-175b668fb856.png"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "avatar.png",
  "contentType": "image/png",
  "description": "My personal avatar",
  "type": "profilePicture",
  "sizeBytes": 112800,
  "createdAt": "2018-01-04T07:00:49.375Z"
}

Responses

StatusDescription
201 Created
Created
Schema: file
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
201 Location string uri
The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with scheme://host
201 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update the resource.

getFile

Code samples

# You can also use wget
curl -X GET /vault/files/{fileId} \
  -H 'Accept: application/hal+json' \
  -H 'If-None-Match: string'

GET /vault/files/{fileId} HTTP/1.1

Accept: application/hal+json
If-None-Match: string

var headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

$.ajax({
  url: '/vault/files/{fileId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

fetch('/vault/files/{fileId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json',
  'If-None-Match' => 'string'
}

result = RestClient.get '/vault/files/{fileId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json',
  'If-None-Match': 'string'
}

r = requests.get('/vault/files/{fileId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/files/{fileId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        "If-None-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/files/{fileId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch the file descriptor

GET /files/{fileId}

Return a HAL representation of this file resource. The Content-Location response header, if present, identifies the equivalent revision.

Parameters

Parameter Description
fileId
(path)
string (required)
The unique identifier of this file. This is an opaque string.
If-None-Match
(header)
string
The entity tag that was returned in the ETag response. If the resource's current entity tag matches, the GET will return 304 (Not Modified) and no response body, else the resource representation will be returned.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* fileId

If-None-Match

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
      "profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:content": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b/content",
      "type": "images/png"
    },
    "apiture:share": {
      "href": "/vault/content/6b580037-2d4f-4b91-bb3f-175b668fb856.png"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "avatar.png",
  "contentType": "image/png",
  "description": "My personal avatar",
  "type": "profilePicture",
  "sizeBytes": 112800,
  "createdAt": "2018-01-04T07:00:49.375Z"
}

Responses

StatusDescription
200 OK
OK
Schema: file
304 Not Modified
Not Modified. The resource has not been modified since it was last fetched.
404 Not Found
Not Found. There is no such file resource at the specified {fileId} or no such file resources for the specified {filter} The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this file resource.
200 Content-Location string
The Content-Location will contain the URI of the specific revision corresponding to this file resource.

updateFile

Code samples

# You can also use wget
curl -X PUT /vault/files/{fileId} \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json' \
  -H 'If-Match: string'

PUT /vault/files/{fileId} HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

$.ajax({
  url: '/vault/files/{fileId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "name": "myAvatar.png",
  "description": "My personal avatar"
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

fetch('/vault/files/{fileId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json',
  'If-Match' => 'string'
}

result = RestClient.put '/vault/files/{fileId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json',
  'If-Match': 'string'
}

r = requests.put('/vault/files/{fileId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/files/{fileId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        "If-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/vault/files/{fileId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Update this file descriptor

PUT /files/{fileId}

Perform a complete replacement of this file's descriptor.

Body parameter

{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "name": "myAvatar.png",
  "description": "My personal avatar"
}

Parameters

Parameter Description
fileId
(path)
string (required)
The unique identifier of this file. This is an opaque string.
If-Match
(header)
string
The entity tag that was returned in the ETag response. This must match the current entity tag of the resource.
body
(body)
updateFile (required)

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPUT
* URL
* API Key
* Access Token

* fileId

If-Match

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
      "profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:content": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b/content",
      "type": "images/png"
    },
    "apiture:share": {
      "href": "/vault/content/6b580037-2d4f-4b91-bb3f-175b668fb856.png"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "avatar.png",
  "contentType": "image/png",
  "description": "My personal avatar",
  "type": "profilePicture",
  "sizeBytes": 112800,
  "createdAt": "2018-01-04T07:00:49.375Z"
}

Responses

StatusDescription
200 OK
OK
Schema: file
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such file resource at the specified {fileId} or no such file resources for the specified {filter} The _error field in the response will contain details about the request error.
Schema: errorResponse
412 Precondition Failed
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this file resource.

patchFile

Code samples

# You can also use wget
curl -X PATCH /vault/files/{fileId} \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json' \
  -H 'If-Match: string'

PATCH /vault/files/{fileId} HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

$.ajax({
  url: '/vault/files/{fileId}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "name": "myAvatar.png",
  "description": "My personal avatar"
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

fetch('/vault/files/{fileId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json',
  'If-Match' => 'string'
}

result = RestClient.patch '/vault/files/{fileId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json',
  'If-Match': 'string'
}

r = requests.patch('/vault/files/{fileId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/files/{fileId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        "If-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "/vault/files/{fileId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Update this file's descriptor

PATCH /files/{fileId}

Perform a partial update of this file's descriptor. Fields which are omitted are not updated. Nested _embedded and _links are ignored if included.

Body parameter

{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "name": "myAvatar.png",
  "description": "My personal avatar"
}

Parameters

Parameter Description
fileId
(path)
string (required)
The unique identifier of this file. This is an opaque string.
If-Match
(header)
string
The entity tag that was returned in the ETag response. This must match the current entity tag of the resource.
body
(body)
updateFile (required)

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPATCH
* URL
* API Key
* Access Token

* fileId

If-Match

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
      "profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:content": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b/content",
      "type": "images/png"
    },
    "apiture:share": {
      "href": "/vault/content/6b580037-2d4f-4b91-bb3f-175b668fb856.png"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "avatar.png",
  "contentType": "image/png",
  "description": "My personal avatar",
  "type": "profilePicture",
  "sizeBytes": 112800,
  "createdAt": "2018-01-04T07:00:49.375Z"
}

Responses

StatusDescription
200 OK
OK
Schema: file
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such file resource at the specified {fileId} or no such file resources for the specified {filter} The _error field in the response will contain details about the request error.
Schema: errorResponse
412 Precondition Failed
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this file resource.

deleteFile

Code samples

# You can also use wget
curl -X DELETE /vault/files/{fileId} \
  -H 'Accept: application/hal+json'

DELETE /vault/files/{fileId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/files/{fileId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/vault/files/{fileId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.delete '/vault/files/{fileId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.delete('/vault/files/{fileId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/files/{fileId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/vault/files/{fileId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Delete this file resource

DELETE /files/{fileId}

Delete this file resource and any resources that are owned by it.

Parameters

Parameter Description
fileId
(path)
string (required)
The unique identifier of this file. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodDELETE
* URL
* API Key
* Access Token

* fileId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

404 Response

{
  "_profile": "https://api.apiture.com/schemas/error/v1.0.0/.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.915Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Responses

StatusDescription
204 No Content
No Content. The resource was deleted successfully.
404 Not Found
Not Found. There is no such file resource at the specified {fileId} or no such file resources for the specified {filter} The _error field in the response will contain details about the request error.
Schema: errorResponse

getFileRevisions

Code samples

# You can also use wget
curl -X GET /vault/files/{fileId}/revisions \
  -H 'Accept: application/hal+json'

GET /vault/files/{fileId}/revisions HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/files/{fileId}/revisions',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/vault/files/{fileId}/revisions',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/vault/files/{fileId}/revisions',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/vault/files/{fileId}/revisions', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/files/{fileId}/revisions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/files/{fileId}/revisions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Return a collection of file revisions

GET /files/{fileId}/revisions

Return a paginated sortable filterable searchable collection of file revisions. The links in the response include pagination links.

Parameters

Parameter Description
fileId
(path)
string (required)
The unique identifier of this file. This is an opaque string.
start
(query)
integer(int64)
The zero-based index of the first product revision item to include in this page. The default 0 denotes the beginning of the collection.
limit
(query)
integer(int32)
The maximum number of product representations to return in this page.
sortBy
(query)
string
Optional sort criteria. Revision collections are sorted by default in reverse chronological order (most recent revision first.) See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* fileId

start

limit

sortBy

filter

q

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json",
  "start": 0,
  "limit": 100,
  "count": 2,
  "name": "files",
  "_links": {
    "self": {
      "href": "/vault/files?start=0&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "first": {
      "href": "/vault/files?start=0&limit=10"
    },
    "next": {
      "href": "/vault/files?start=100&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "collection": {
      "href": "/vault/files",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "items": [
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "54867739-eca4-434d-8869-8fe6a6248f55",
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/54867739-eca4-434d-8869-8fe6a6248f55"
          }
        }
      },
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "70955bd8-0bc2-4129-9117-cc7749406cfe",
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/70955bd8-0bc2-4129-9117-cc7749406cfe"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: files
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such file resource at the specified {fileId} or no such file resources for the specified {filter} The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

getFileRevision

Code samples

# You can also use wget
curl -X GET /vault/files/{fileId}/revisions/{revisionId} \
  -H 'Accept: application/hal+json' \
  -H 'If-None-Match: string'

GET /vault/files/{fileId}/revisions/{revisionId} HTTP/1.1

Accept: application/hal+json
If-None-Match: string

var headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

$.ajax({
  url: '/vault/files/{fileId}/revisions/{revisionId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

fetch('/vault/files/{fileId}/revisions/{revisionId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json',
  'If-None-Match' => 'string'
}

result = RestClient.get '/vault/files/{fileId}/revisions/{revisionId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json',
  'If-None-Match': 'string'
}

r = requests.get('/vault/files/{fileId}/revisions/{revisionId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/files/{fileId}/revisions/{revisionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        "If-None-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/files/{fileId}/revisions/{revisionId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch a representation of an immutable revision of this file

GET /files/{fileId}/revisions/{revisionId}

Return an immutable HAL representation of this revision of this file resource. The revision may also have prev and next links to previous and/or next revisions, if they exist.

Parameters

Parameter Description
fileId
(path)
string (required)
The unique identifier of this file. This is an opaque string.
revisionId
(path)
string (required)
The identifier for a revision of this resource. Revision identifiers use ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.
If-None-Match
(header)
string
The entity tag that was returned in the ETag response. If the resource's current entity tag matches, the GET will return 304 (Not Modified) and no response body, else the resource representation will be returned.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* fileId

* revisionId

If-None-Match

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json",
  "start": 0,
  "limit": 100,
  "count": 2,
  "name": "files",
  "_links": {
    "self": {
      "href": "/vault/files?start=0&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "first": {
      "href": "/vault/files?start=0&limit=10"
    },
    "next": {
      "href": "/vault/files?start=100&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "collection": {
      "href": "/vault/files",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "items": [
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "54867739-eca4-434d-8869-8fe6a6248f55",
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/54867739-eca4-434d-8869-8fe6a6248f55"
          }
        }
      },
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "70955bd8-0bc2-4129-9117-cc7749406cfe",
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/70955bd8-0bc2-4129-9117-cc7749406cfe"
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: files
304 Not Modified
Not Modified. The resource has not been modified since it was last fetched.
404 Not Found
Not Found. There is no such file resource at the specified {fileId} or no such file resources for the specified {filter} The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this file resource.

getFileContent

Code samples

# You can also use wget
curl -X GET /vault/files/{fileId}/content \
  -H 'Accept: */*'

GET /vault/files/{fileId}/content HTTP/1.1

Accept: */*

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: '/vault/files/{fileId}/content',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'*/*'

};

fetch('/vault/files/{fileId}/content',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*'
}

result = RestClient.get '/vault/files/{fileId}/content',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*'
}

r = requests.get('/vault/files/{fileId}/content', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/files/{fileId}/content");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/files/{fileId}/content", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Return the raw content of the file

GET /files/{fileId}/content

Return the raw content of the file as a stream of bytes. This operation normally returns a 303 to redirect the caller to the actual URL where the file conent is available.

Parameters

Parameter Description
fileId
(path)
string (required)
The unique identifier of this file. This is an opaque string.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* fileId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

404 Response

{
  "_profile": "https://api.apiture.com/schemas/error/v1.0.0/.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.915Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: string
302 Found
Found. The URL where the file's content is located. This is the most likely response.
404 Not Found
Not Found. There is no such file resource at the specified {fileId} or no such file resources for the specified {filter} The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
200 Content-Type string
The media type of the file content.
302 Location string
The URL where the file's content is located.

getSharedContent

Code samples

# You can also use wget
curl -X GET /vault/content/{contentId} \
  -H 'Accept: */*'

GET /vault/content/{contentId} HTTP/1.1

Accept: */*

var headers = {
  'Accept':'*/*'

};

$.ajax({
  url: '/vault/content/{contentId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'*/*'

};

fetch('/vault/content/{contentId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => '*/*'
}

result = RestClient.get '/vault/content/{contentId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': '*/*'
}

r = requests.get('/vault/content/{contentId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/content/{contentId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"*/*"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/content/{contentId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Get a shared file's content

GET /content/{contentId}

/content/{contentId} represents the shared URL Return the raw content of the file as a stream of bytes. This operation normally returns a 303 to redirect the caller to the actual URL where the file conent is available.

**TODO**: Add a `delete` method to unshare a file.

Parameters

Parameter Description
contentId
(path)
string (required)
The unique ID that refers to a file's raw content and represents the ../publicly shared file. This ID is not related to the {fileId} and can be revoked when the user decides to unshare a file.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* contentId

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

404 Response

{
  "_profile": "https://api.apiture.com/schemas/error/v1.0.0/.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.915Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Responses

StatusDescription
200 OK
OK
Schema: string
302 Found
Found. The URL where the file's content is located. This is the most likely response.
404 Not Found
Not Found. There is no such file resource at the specified {fileId} or no such file resources for the specified {filter} The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
200 Content-Type string
The media type of the file content.
302 Location string
The URL where the file's content is located.

Folder

A container for files and other folders.

getFolders

Code samples

# You can also use wget
curl -X GET /vault/folders \
  -H 'Accept: application/hal+json'

GET /vault/folders HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/folders',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/vault/folders',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.get '/vault/folders',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.get('/vault/folders', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/folders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/folders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Return a collection of folders

GET /folders

Return a paginated sortable filterable searchable collection of folders. The links in the response include pagination links.

Parameters

Parameter Description
start
(query)
integer(int64)
The zero-based index of the first folder in this page. The default, 0, represents the first page of the collection.
limit
(query)
integer(int32)
The maximum number of folder representations to return in this page.
sortBy
(query)
string
Optional sort criteria. See sort criteria format, such as ?sortBy=field1,-field2.
filter
(query)
string
Optional filter criteria. See filtering.
q
(query)
string
Optional search string. See searching.
folder
(query)
string
Subset the response to resources that reside directly within the specified folder. The value may be a folder ID or a folder URI.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

start

limit

sortBy

filter

q

folder

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json",
  "start": 0,
  "limit": 100,
  "count": 17,
  "name": "folders",
  "_links": {
    "self": {
      "href": "/vault/folders?start=0&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    },
    "first": {
      "href": "/basePath/folders?start=0&limit=10"
    },
    "next": {
      "href": "/vault/folders?start=100&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    },
    "collection": {
      "href": "/vault/folders",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "items": [
      {
        "name": "...",
        "description": "...",
        "_links": {
          "self": {
            "href": "..."
          }
        }
      }
    ]
  }
}

Responses

StatusDescription
200 OK
OK
Schema: folders
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse

createFolder

Code samples

# You can also use wget
curl -X POST /vault/folders \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json'

POST /vault/folders HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/folders',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "_profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json",
  "name": "My account application documents",
  "description": "Default folder for account application documents.",
  "type": "any",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2"
    }
  }
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json'

};

fetch('/vault/folders',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json'
}

result = RestClient.post '/vault/folders',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json'
}

r = requests.post('/vault/folders', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/folders");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/vault/folders", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Create a new folder

POST /folders

Create a new folder in the folders collection. To locate the folder within an existing folder (as a subfolder), specify the desired target folder with the apiture:folder link within the request body's _links.

Body parameter

{
  "_profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json",
  "name": "My account application documents",
  "description": "Default folder for account application documents.",
  "type": "any",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2"
    }
  }
}

Parameters

Parameter Description
body
(body)
createFolder (required)
The data necessary to create a new folder.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPOST
* URL
* API Key
* Access Token

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

201 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:files": {
      "href": "/vault/files?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "apiture:children": {
      "href": "/vault/folders?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "My uploads",
  "createdAt": "2018-01-04T08:22:24.375Z",
  "type": "any"
}

Responses

StatusDescription
201 Created
Created
Schema: folder
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.

Response Headers

StatusDescription
201 Location string uri
The URI of the new resource. If the URI begins with / it is relative to the API root context. Else, it is a full URI starting with scheme://host.
201 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update the resource.

getFolder

Code samples

# You can also use wget
curl -X GET /vault/folders/{folderId} \
  -H 'Accept: application/hal+json' \
  -H 'If-None-Match: string'

GET /vault/folders/{folderId} HTTP/1.1

Accept: application/hal+json
If-None-Match: string

var headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

$.ajax({
  url: '/vault/folders/{folderId}',
  method: 'get',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json',
  'If-None-Match':'string'

};

fetch('/vault/folders/{folderId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json',
  'If-None-Match' => 'string'
}

result = RestClient.get '/vault/folders/{folderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json',
  'If-None-Match': 'string'
}

r = requests.get('/vault/folders/{folderId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/folders/{folderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        "If-None-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/vault/folders/{folderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Fetch a representation of this folder

GET /folders/{folderId}

Return a HAL representation of this folder resource.

Parameters

Parameter Description
folderId
(path)
string (required)
The unique identifier of this folder. This is an immutable opaque string.
If-None-Match
(header)
string
The entity tag that was returned in the ETag response. If the resource's current entity tag matches, the GET will return 304 (Not Modified) and no response body, else the resource representation will be returned.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodGET
* URL
* API Key
* Access Token

* folderId

If-None-Match

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:files": {
      "href": "/vault/files?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "apiture:children": {
      "href": "/vault/folders?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "My uploads",
  "createdAt": "2018-01-04T08:22:24.375Z",
  "type": "any"
}

Responses

StatusDescription
200 OK
OK
Schema: folder
304 Not Modified
Not Modified. The resource has not been modified since it was last fetched.
404 Not Found
Not Found. There is no such folder resource at the specified {folderId} The _error field in the response will contain details about the request error.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this folder resource.

updateFolder

Code samples

# You can also use wget
curl -X PUT /vault/folders/{folderId} \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json' \
  -H 'If-Match: string'

PUT /vault/folders/{folderId} HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

$.ajax({
  url: '/vault/folders/{folderId}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "_id": "c78e62e9-9380-4432-8f6c-99a8710b2f74",
  "_profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json",
  "name": "My account application documents",
  "description": "Default folder for account application documents",
  "type": "any",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    }
  }
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

fetch('/vault/folders/{folderId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json',
  'If-Match' => 'string'
}

result = RestClient.put '/vault/folders/{folderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json',
  'If-Match': 'string'
}

r = requests.put('/vault/folders/{folderId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/folders/{folderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        "If-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/vault/folders/{folderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Update this folder

PUT /folders/{folderId}

Perform a complete replacement of this folder.

Body parameter

{
  "_id": "c78e62e9-9380-4432-8f6c-99a8710b2f74",
  "_profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json",
  "name": "My account application documents",
  "description": "Default folder for account application documents",
  "type": "any",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    }
  }
}

Parameters

Parameter Description
folderId
(path)
string (required)
The unique identifier of this folder. This is an immutable opaque string.
If-Match
(header)
string
The entity tag that was returned in the ETag response. This must match the current entity tag of the resource.
body
(body)
updateFolder (required)

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPUT
* URL
* API Key
* Access Token

* folderId

If-Match

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:files": {
      "href": "/vault/files?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "apiture:children": {
      "href": "/vault/folders?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "My uploads",
  "createdAt": "2018-01-04T08:22:24.375Z",
  "type": "any"
}

Responses

StatusDescription
200 OK
OK
Schema: folder
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such folder resource at the specified {folderId} The _error field in the response will contain details about the request error.
Schema: errorResponse
412 Precondition Failed
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this folder resource.

patchFolder

Code samples

# You can also use wget
curl -X PATCH /vault/folders/{folderId} \
  -H 'Content-Type: application/hal+json' \
  -H 'Accept: application/hal+json' \
  -H 'If-Match: string'

PATCH /vault/folders/{folderId} HTTP/1.1

Content-Type: application/hal+json
Accept: application/hal+json
If-Match: string

var headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

$.ajax({
  url: '/vault/folders/{folderId}',
  method: 'patch',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "_id": "c78e62e9-9380-4432-8f6c-99a8710b2f74",
  "_profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json",
  "name": "My account application documents",
  "description": "Default folder for account application documents",
  "type": "any",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    }
  }
}';
const headers = {
  'Content-Type':'application/hal+json',
  'Accept':'application/hal+json',
  'If-Match':'string'

};

fetch('/vault/folders/{folderId}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/hal+json',
  'Accept' => 'application/hal+json',
  'If-Match' => 'string'
}

result = RestClient.patch '/vault/folders/{folderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/hal+json',
  'Accept': 'application/hal+json',
  'If-Match': 'string'
}

r = requests.patch('/vault/folders/{folderId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/folders/{folderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PATCH");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/hal+json"},
        "Accept": []string{"application/hal+json"},
        "If-Match": []string{"string"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PATCH", "/vault/folders/{folderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Update this folder

PATCH /folders/{folderId}

Perform a partial update of this folder. Fields which are omitted are not updated. Nested _embedded and _links are ignored if included.

Body parameter

{
  "_id": "c78e62e9-9380-4432-8f6c-99a8710b2f74",
  "_profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json",
  "name": "My account application documents",
  "description": "Default folder for account application documents",
  "type": "any",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    }
  }
}

Parameters

Parameter Description
folderId
(path)
string (required)
The unique identifier of this folder. This is an immutable opaque string.
If-Match
(header)
string
The entity tag that was returned in the ETag response. This must match the current entity tag of the resource.
body
(body)
updateFolder (required)

Try it

Fields marked with * are mandatory.

ParameterValue
MethodPATCH
* URL
* API Key
* Access Token

* folderId

If-Match

* body

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

200 Response

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:files": {
      "href": "/vault/files?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "apiture:children": {
      "href": "/vault/folders?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "My uploads",
  "createdAt": "2018-01-04T08:22:24.375Z",
  "type": "any"
}

Responses

StatusDescription
200 OK
OK
Schema: folder
400 Bad Request
Bad Request. The request body or one or more of the query parameters was not well formed. The _error field in the response will contain details about the request error.
Schema: errorResponse
404 Not Found
Not Found. There is no such folder resource at the specified {folderId} The _error field in the response will contain details about the request error.
Schema: errorResponse
412 Precondition Failed
Precondition Failed. The supplied if-Match header value does not match the most recent ETag response header value. The resource has changed in the interim.
Schema: errorResponse
422 Unprocessable Entity
Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The _error field in the response will contain details about the request error.
Schema: errorResponse
428 Precondition Required
Precondition Required. The request did not include the required if-Match header. Resubmit with the operation, supplying the value of the ETag and the most recent state of the resource.
Schema: errorResponse

Response Headers

StatusDescription
200 ETag string
The ETag response header specifies an entity tag which must be provided in an If-Match request header for PUT or PATCH operations which update this folder resource.

deleteFolder

Code samples

# You can also use wget
curl -X DELETE /vault/folders/{folderId} \
  -H 'Accept: application/hal+json'

DELETE /vault/folders/{folderId} HTTP/1.1

Accept: application/hal+json

var headers = {
  'Accept':'application/hal+json'

};

$.ajax({
  url: '/vault/folders/{folderId}',
  method: 'delete',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/hal+json'

};

fetch('/vault/folders/{folderId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/hal+json'
}

result = RestClient.delete '/vault/folders/{folderId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/hal+json'
}

r = requests.delete('/vault/folders/{folderId}', params={

}, headers = headers)

print r.json()

URL obj = new URL("/vault/folders/{folderId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/hal+json"},
        
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/vault/folders/{folderId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

Delete this folder resource

DELETE /folders/{folderId}

Delete this folder.

Normally, one can only delete a folder if it is empty (contains no files or subfolders). With the ?recursive=true option, this operation will delete a non-empty folder and its contents, including nested folders. The user must have authorization to delete all the contents.

The user may not delete their top-level folder.

Parameters

Parameter Description
folderId
(path)
string (required)
The unique identifier of this folder. This is an immutable opaque string.
recursive
(query)
boolean
If true, also delete all files and nested folders that are stored in this folder.

Try it

Fields marked with * are mandatory.

ParameterValue
MethodDELETE
* URL
* API Key
* Access Token

* folderId

recursive

Response

Response Code:

Response Headers:

Response Body:

    
      Click on 'Try It' to get a response.
    
  

Example responses

404 Response

{
  "_profile": "https://api.apiture.com/schemas/error/v1.0.0/.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.915Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Responses

StatusDescription
204 No Content
No Content. The resource was deleted successfully.
404 Not Found
Not Found. There is no such folder resource at the specified {folderId} The _error field in the response will contain details about the request error.
Schema: errorResponse
409 Conflict
Conflict. A conflict can occur if a folder being deleted contains files.
Schema: errorResponse

Schemas

folderFields

{
  "name": "My uploads",
  "description": "Default folder where new files are uploaded",
  "type": "any"
}

Folder Fields

Properties

Schema NameDescription
name string (required)
The folder name, for identification purposes. This is limited to 64 characters and may not contain certain special characters such as / or \. If omitted, the system will assign a name.
maxLength: 64
description string
A description of this folder and its contents.
maxLength: 4096
type string
An optional folder type which describes the intended use or role of the folder and its contents.
revisionsEnabled boolean
If true, files in this folder maintain revisions. This property may not be changed after a folder has been created. Moving a file from a folder which has revisions enable to one that has them disabled will result in the loss of the revisions.

summaryFolder

{
  "_id": "0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
  "_profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    }
  },
  "name": "My uploads",
  "description": "Default folder where new files are uploaded.",
  "type": "any"
}

Folder Summary

Properties

allOf

Schema NameDescription
anonymous createFolder

Representation used to create a new folder. When creating a new folder, the request may contain the following links:

  • apiture:folder : The href is the URI of the desired parent folder. The user must have permission to add a subfolder to the parent folder.

and

Schema NameDescription
anonymous object
undefined
_id string
The unique identifier for this folder resource. This is an immutable opaque string.

createFolder

{
  "_profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json",
  "name": "My account application documents",
  "description": "Default folder for account application documents.",
  "type": "any",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2"
    }
  }
}

Create Folder

Properties

Schema NameDescription
Create Folder any

Representation used to create a new folder. When creating a new folder, the request may contain the following links:

  • apiture:folder : The href is the URI of the desired parent folder. The user must have permission to add a subfolder to the parent folder.

allOf

Schema NameDescription
anonymous folderFields
Core fields of the folder resource. This model schema is used to construct other model schema.

and

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

updateFolder

{
  "_id": "c78e62e9-9380-4432-8f6c-99a8710b2f74",
  "_profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json",
  "name": "My account application documents",
  "description": "Default folder for account application documents",
  "type": "any",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    }
  }
}

Update Folder

Properties

Schema NameDescription
Update Folder any
Representation used to update or patch a folder. Note: The folder's revisionsEnabled property is immutable.

allOf

Schema NameDescription
anonymous summaryFolder
Summary representation of a folder resource in folders collections. This representation normally does not contain any _embedded objects. If needed, call the GET operation on the item's self link to get _embedded objects.

and

Schema NameDescription
anonymous object
undefined
_id string
This folder's unique ID.

folder

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:files": {
      "href": "/vault/files?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "apiture:children": {
      "href": "/vault/folders?folder=0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "My uploads",
  "createdAt": "2018-01-04T08:22:24.375Z",
  "type": "any"
}

Folder

Properties

Schema NameDescription
Folder any

Hierarchical folder structures for organizing related files and folders. A folder has a parent folder, a set of files, and a set of child folders. Links in a folder resource:

  • apiture:folder : links to the parent folder, if the folder has a parent.
  • apiture:files : links to the collection of files in the folder; this may be empty.
  • apiture:children : links to the collection of subfolder whose parent is this folder; this may be empty.

allOf

Schema NameDescription
anonymous updateFolder
Representation used to update or patch a folder. Note: The folder's revisionsEnabled property is immutable.

and

Schema NameDescription
anonymous object
undefined
fileCount number(integer)
The number of files in this folder.
read-only
folderCount number(integer)
The number of subfolders of this folder
read-only
createdAt string(date-time)
The date-time when the folder was created or uploaded.
read-only

collection

{
  "_profile": "https://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  },
  "count": 0,
  "start": 0,
  "limit": 0,
  "name": "string"
}

Collection

Properties

Schema NameDescription
Collection any
A collection of resources.

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous object
undefined
count integer
The number of resource representations in this collection.
start integer
The start index of this page of items.
limit integer
The maximum number of items per page.
name string
The name of the collection.

folders

{
  "_profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json",
  "start": 0,
  "limit": 100,
  "count": 17,
  "name": "folders",
  "_links": {
    "self": {
      "href": "/vault/folders?start=0&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    },
    "first": {
      "href": "/basePath/folders?start=0&limit=10"
    },
    "next": {
      "href": "/vault/folders?start=100&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    },
    "collection": {
      "href": "/vault/folders",
      "profile": "https://api.apiture.com/schemas/collection/folder/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "items": [
      {
        "name": "...",
        "description": "...",
        "_links": {
          "self": {
            "href": "..."
          }
        }
      }
    ]
  }
}

Folder Collection

Properties

Schema NameDescription
Folder Collection any
Collection of folders. The items in the collection are ordered in the _embedded object with name items. The top-level _links object may contain pagination links (self, next, prev, first, last, collection.)

allOf

Schema NameDescription
anonymous collection
A collection of resources.

and

Schema NameDescription
anonymous object
undefined
_embedded object
undefined
items [summaryFolder]
An array containing a page of folder items.

fileFields

{
  "name": "string",
  "description": "string",
  "type": "string",
  "sizeBytes": 0,
  "contentType": "application/pdf",
  "revisionId": "2018-08-22T11:34:14.375Z",
  "externalId": "bdca053e-399a-462b-bbb1-18c2682b1087",
  "category": "driversLicense"
}

File Fields

Properties

Schema NameDescription
name string (required)
The file name, for identification purposes. File names may include file extensions such as .pdf for PDF documents, although the system does not validate or ensure that extensions match the file content type. This is limited to 64 characters and may not contain certain special characters such as / or \. If omitted, the system will assign a name.
maxLength: 64
description string
A description of this file and its contents.
maxLength: 4096
type string
The document type as determined by the business use case. Unlike the contentType, this indicates what the document content represents (such as a processedCheckImage, mobileCheckDepositImageFront, etc.)
sizeBytes number(integer)
The file size in bytes. When creating an upload, the caller can pass this in to indicate the file's size. The services uses this to generate a more accurate upload progress as a percentage of the total upload size. It is not enforced (that is, the actual upload size does not have to match this value.)
contentType string
The media type for this file. For text documents, the content type should include the text encoding; if omitted, the encoding type is assumed to be utf-8.
revisionId number
The revision identifier for this file, if this file is in a folder that has revisions enabled. This is an ISO 8601 formatted date-time string, yyyy-mm-ddTHH:MM:SS.sssZ. This field is immutable.
read-only
externalId string
If using external data hosting, externalId is used as a lookup key
read-only
category string (required)
Required document category, within the enum of options. Required for compliance to categorize PII documents.

Enumerated Values

Property Value
category driversLicense
category militaryIdentification
category passport
category socialSecurityCard
category stateIdentification
category taxForm
category utilityBill

revisionEffectiveInterval

{
  "effectiveStartAt": "2019-02-20T12:18:27Z",
  "effectiveEndAt": "2019-02-20T12:18:27Z"
}

Revision Effective Time Interval

Properties

Schema NameDescription
effectiveStartAt string(date-time)
The date-time when this revision was created and become effective. This is an ISO 8601 formatted date-time string, yyyy-mm-ddTHH:MM:SS.sssZ. This field is immutable.
effectiveEndAt string(date-time)
The date-time when the another revision became effective and this revision ceased being effective. This is an ISO 8601 formatted date-time string, yyyy-mm-ddTHH:MM:SS.sssZ. This field is immutable and is not present until the revision is no longer active. If present in a PUT or PATCH, this date (not the current date-time) will be used for the revision ID and the effectiveStartAt of the next revision, but the date must be between the revision's effectiveStartAt and the current date-time.

summaryFile

{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/files/0399abed-fd3d-4830-a88b-30f38b8a365c"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55"
    }
  },
  "name": "avatar.png",
  "description": "My personal avatar",
  "contentType": "image/png",
  "type": "profilePicture"
}

File Summary

Properties

allOf

Schema NameDescription
anonymous createFile

Representation used to create a new file. When creating a file, one can specify a link to the parent folder:

  • apiture:folder A link to the desired target folder. The user must have permission to add files to this folder.

and

Schema NameDescription
anonymous revisionEffectiveInterval
Time interval when a resource revision was active. This schema is used when composing other schemas.

Note: This schema should be moved to common-models.

and

Schema NameDescription
anonymous object
undefined
_id string
The unique identifier for this file resource. This is an immutable opaque string.

createFile

{
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "name": "avatar.png",
  "contentType": "image/png",
  "description": "My personal avatar",
  "type": "profilePicture",
  "_links": {
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55"
    }
  }
}

Create File

Properties

Schema NameDescription
Create File any

Representation used to create a new file. When creating a file, one can specify a link to the parent folder:

  • apiture:folder A link to the desired target folder. The user must have permission to add files to this folder.

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous fileFields
Core fields of the file resource. This model schema is used to construct other model schema.

updateFile

{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "name": "myAvatar.png",
  "description": "My personal avatar"
}

Update File

Properties

Schema NameDescription
Update File any
Representation used to update or patch a file.

allOf

Schema NameDescription
anonymous summaryFile
Summary representation of a file resource in files collections. This representation normally does not contain any _embedded objects. If needed, call the GET operation on the item's self link to get _embedded objects.

and

Schema NameDescription
anonymous object
undefined
_id string
This file's unique ID.

file

{
  "_id": "7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
  "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b",
      "profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json"
    },
    "apiture:folder": {
      "href": "/vault/folders/0094eabb-75e8-49f6-b8f4-0af7cb69eb55",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    },
    "apiture:content": {
      "href": "/vault/files/7dc00a42-76f9-4bbb-bda3-bd6ed203c01b/content",
      "type": "images/png"
    },
    "apiture:share": {
      "href": "/vault/content/6b580037-2d4f-4b91-bb3f-175b668fb856.png"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    }
  },
  "name": "avatar.png",
  "contentType": "image/png",
  "description": "My personal avatar",
  "type": "profilePicture",
  "sizeBytes": 112800,
  "createdAt": "2018-01-04T07:00:49.375Z"
}

File

Properties

Schema NameDescription
File any

Representation of a file (document) resource residing in the file vault. A file may have the following links:

  • apiture:folder : The folder where the file resides.
  • apiture:share : The ../publicly shared URI of the file's content.
  • apiture:content : The direct URI of the file's content
  • apiture:uploadUrl : The URL which is used to upload the file content with PUT. This link only exists when this file representation is included within an upload tracker.
  • apiture:revisions : The previous revisions of this file, if any.

allOf

Schema NameDescription
anonymous updateFile
Representation used to update or patch a file.

and

Schema NameDescription
anonymous object
undefined
createdAt string(date-time)
The date-time when the file was created or uploaded.
read-only
sizeBytes number
The file size in bytes. This is a derived property and cannot be modified in updates.
read-only

files

{
  "_profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json",
  "start": 0,
  "limit": 100,
  "count": 2,
  "name": "files",
  "_links": {
    "self": {
      "href": "/vault/files?start=0&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "first": {
      "href": "/vault/files?start=0&limit=10"
    },
    "next": {
      "href": "/vault/files?start=100&limit=100",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    },
    "collection": {
      "href": "/vault/files",
      "profile": "https://api.apiture.com/schemas/collection/file/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "items": [
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "54867739-eca4-434d-8869-8fe6a6248f55",
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/54867739-eca4-434d-8869-8fe6a6248f55"
          }
        }
      },
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "_id": "70955bd8-0bc2-4129-9117-cc7749406cfe",
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg",
        "_links": {
          "self": {
            "href": "/vault/files/70955bd8-0bc2-4129-9117-cc7749406cfe"
          }
        }
      }
    ]
  }
}

File Collection

Properties

Schema NameDescription
File Collection any
Collection of files. The items in the collection are ordered in the _embedded object with name items. The top-level _links object may contain pagination links (self, next, prev, first, last, collection.)

allOf

Schema NameDescription
anonymous collection
A collection of resources.

and

Schema NameDescription
anonymous object
undefined
_embedded object
undefined
items [summaryFile]
[Summary representation of a file resource in files collections. This representation normally does not contain any _embedded objects. If needed, call the GET operation on the item's self link to get _embedded objects.]

uploadFields

{
  "count": 1,
  "name": "string"
}

Upload Fields

Properties

Schema NameDescription
count number(integer) (required)
The number of files to upload.
minimum: 1
name string
The name of the items collection in the items array in this upload's _embedded objects. This should be 'files'.
maxLength: 32

createUpload

{
  "_profile": "https://api.apiture.com/schemas/upload/v1.0.0/profile.json",
  "count": 2,
  "name": "files",
  "_embedded": {
    "items": [
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg"
      },
      {
        "_profile": "https://api.apiture.com/schemas/file/v1.0.0/profile.json",
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg"
      }
    ]
  }
}

Create Upload

Properties

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous uploadFields
Core fields of the upload resource. This model schema is used to construct other model schema.

and

Schema NameDescription
anonymous object
undefined
_embedded object
A list of the file descriptions which will be uploaded.
items [createFile]
An array containing a summary of each file to be uploaded.

summaryUpload

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "https://api.apiture.com/schemas/upload/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/uploads/0399abed-fd3d-4830-a88b-30f38b8a365c"
    }
  },
  "count": 2,
  "_embedded": {}
}

Upload Summary

Properties

allOf

Schema NameDescription
anonymous createUpload

Representation used to create a new upload. The _embedded.items array must contain one or more file descriptors with the file name, description, type, and contentType. Optional links that are honored in an upload request include the following:

  • apiture:folder : The target folder where to uploaded the file(s) should be placed.'

and

Schema NameDescription
anonymous object
undefined
_id any
The unique identifier for this upload resource. This is an immutable opaque string.

upload

{
  "_id": "0399abed-fd3d-4830-a88b-30f38b8a365c",
  "_profile": "https://api.apiture.com/schemas/upload/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "/vault/uploads/0399abed-fd3d-4830-a88b-30f38b8a365c"
    },
    "apiture:folder": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2"
    }
  },
  "_embedded": {
    "other": {
      "_id": "2f41f97f-f8d2-4ec1-89f5-c7c9d2583aad",
      "_profile": "https://api.apiture.com/schemas/other/v1.0.0/profile.json"
    },
    "items": [
      {
        "contentType": "image/jpg",
        "type": "checkImageFront",
        "description": "Image of the front of a mobile check deposit for transaction 3839827893",
        "name": "check-front-3839827893.jpg",
        "_links": {
          "apiture:uploadUrl": {
            "href": "/some/opaque/upload/url/for/this/file"
          }
        }
      },
      {
        "contentType": "image/jpg",
        "type": "checkImageBack",
        "description": "Image of the back of a mobile check deposit for transaction 3839827893",
        "name": "check-back-3839827893.jpg",
        "_links": {
          "apiture:uploadUrl": {
            "href": "/some/opaque/upload/url/for/this/file"
          }
        }
      }
    ]
  },
  "count": 2,
  "name": "files",
  "state": "pending",
  "expiresAt": "2017-12-23T00:00:00.000Z",
  "maximumFileSizeBytes": 25000000,
  "maximumReqestSizeBytes": 50000000
}

Upload

Properties

Schema NameDescription
Upload any

A request to start a file upload. Optional links that are honored in an upload request include the following:

  • apiture:folder : The target folder for where to upload the file(s)

    This _upload tracker response_ contains an array of items, one for each file to upload. Each item contains an *`apiture:uploadUrl*` link within the item's `_links`. The client should next `PUT` the file(s) content to the upload URLs to upload each file's contents.

    **TODO**: include progress info, such as I of J files uploaded and percent complete.

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous uploadFields
Core fields of the upload resource. This model schema is used to construct other model schema.

and

Schema NameDescription
anonymous object
undefined
_id string
The unique identifier for this upload resource. This is an immutable opaque string.
name string
The name of the items collection. In this case, the items in the embedded list are 'files'.
state string

The status of the upload request.

  • pending - The upload is pending but has not started
  • started - The upload has started
  • completed - The upload has completed successfully
  • failed - The upload has failed or timed out.
maximumFileSizeBytes integer
The maximum individual file size allowed, in bytes. This is a derived field and ignored in an upload request.
read-only
maximumRequestSizeBytes integer
The maximum upload request size allowed, in bytes; this is the total size of the multipart/form-data request which is larger than the sum of just the file bytes due to extra metadata and encoding in a multipart/form-data request body. This is a derived field and ignored in an upload request.
read-only
expiresAt string(date-time)
The date-time when this upload request expires. If no file is uploaded by this time, this upload request will be deleted and the upload URL in each file descriptor may no longer work. This is a derived field and ignored in an upload request.
read-only
_embedded object
A list of the file descriptions which will be uploaded.
items [summaryFile]
An array containing a summary of each file to be uploaded.

Enumerated Values

Property Value
name files
state pending
state started
state completed
state failed

uploads

{
  "_profile": "https://api.apiture.com/schemas/collection/upload/v1.0.0/profile.json",
  "start": 10,
  "limit": 10,
  "count": 2,
  "name": "uploads",
  "_links": {
    "self": {
      "href": "/vault/uploads?start=10&limit=10"
    },
    "first": {
      "href": "/vault/uploads?start=0&limit=10"
    },
    "next": {
      "href": "/vault/uploads?start=100&limit=100"
    },
    "collection": {
      "href": "/vault/uploads"
    },
    "apiture:myUploads": {
      "href": "/vault/folders/0cbd28ca-27f7-47fa-a223-ce4f91dcc2b2",
      "profile": "https://api.apiture.com/schemas/folder/v1.0.0/profile.json"
    }
  },
  "_embedded": {
    "items": [
      {
        "_id": "d3a954aa-2027-4e92-b5b0-136bf31b1837",
        "count": 1,
        "name": "files",
        "_embedded": [
          {
            "name": "image1.png",
            "contentType": "image/png"
          },
          {
            "name": "image2.png",
            "contentType": "image/png"
          }
        ],
        "_links": {
          "self": {
            "href": "/vault/uploads/d3a954aa-2027-4e92-b5b0-136bf31b1837"
          }
        }
      },
      {
        "_id": "70ac012a-d66a-4a2a-8286-916dfda25799",
        "count": 1,
        "name": "files",
        "_links": {
          "self": {
            "href": "/vault/uploads/70ac012a-d66a-4a2a-8286-916dfda25799"
          }
        }
      }
    ]
  }
}

Upload Collection

Properties

Schema NameDescription
Upload Collection any
Collection of uploads. The items in the collection are ordered in the _embedded object with name items. The top-level _links object may contain pagination links (self, next, prev, first, last, collection.)

allOf

Schema NameDescription
anonymous collection
A collection of resources.

and

Schema NameDescription
anonymous object
undefined
_embedded object
undefined
items [summaryUpload]
An array containing a page of upload items.

abstractResource

{
  "_profile": "https://api.apiture.com/schemas/example/v1.0.0/profile.json",
  "_links": {
    "self": {
      "href": "{uri of current resource}"
    }
  }
}

Abstract Resource

Properties

Schema NameDescription
_links links
An optional map of links, mapping each link relation to a link object. This model defines the _links object of HAL representations.
_embedded object
An optional map of nested resources, mapping each nested resource name to a nested resource representation.
_profile string(uri)
The URI of a resource profile which describes the representation.
_error error
An object which describes an error. This value is omitted if the operation succeeded without error.

root

{
  "id": "apiName",
  "name": "API name",
  "apiVersion": "0.0.1-SNAPSHOT",
  "_profile": "https://api.apiture.com/schemas/apiRoot/v1.0.0/profile.json",
  "_links": {}
}

API Root

Properties

Schema NameDescription
API Root any
A HAL response, with hypermedia _links for the top-level resources and operations in API.

allOf

Schema NameDescription
anonymous abstractResource
An augmented HAL resource representation. This model contains hypermedia _links, and either optional domain object data with _profile and optional _embedded objects, or an _error object. In responses, if the operation was successful, this object will not include the _error, but if the operation was a 4xx or 5xx error, this object will not include _embedded or any data fields, only _error and optionally _links.

and

Schema NameDescription
anonymous object
undefined
_id string
This API's unique ID.
name string
This API's name.
apiVersion string
This API's version.

errorResponse

{
  "_profile": "https://api.apiture.com/schemas/error/v1.0.0/.json",
  "_error": {
    "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
    "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
    "message": "The value for deposit must be greater than 0.",
    "statusCode": 422,
    "type": "positiveNumberRequired",
    "attributes": {
      "value": -125.5
    },
    "remediation": "Provide a value which is greater than 0",
    "occurredAt": "2019-02-20T12:18:18.915Z",
    "_links": {
      "describedby": {
        "href": "http://doc.apiture.com/errors/positiveNumberRequired"
      }
    },
    "_embedded": {
      "errors": []
    }
  }
}

Error Response

Properties

Schema NameDescription
Error Response abstractResource
Describes an error response, typically returned on 4xx or 5xx errors from API operations. The _error object contains the error details.

error

{
  "_id": "2eae46e1-575c-4d69-8a8f-0a7b0115a4b3",
  "_profile": "https://api.apiture.com/schemas/error/v1.0.0/profile.json",
  "message": "The value for deposit must be greater than 0.",
  "statusCode": 422,
  "type": "positiveNumberRequired",
  "attributes": {
    "value": -125.5
  },
  "remediation": "Provide a value which is greater than 0",
  "occurredAt": "2018-01-25T05:50:52.375Z",
  "_links": {
    "describedby": {
      "href": "http://doc.apiture.com/errors/positiveNumberRequired"
    }
  },
  "_embedded": {
    "errors": []
  }
}

Error

Properties

Schema NameDescription
message string (required)
A localized message string describing the error condition.
_id string
A unique identifier for this error instance. This may be used as a correlation ID with the root cause error (i.e. this ID may be logged at the source of the error). This is is an opaque string.
statusCode integer
The HTTP status code associate with this error.
minimum: 100
maximum: 599
type string
An error identifier which indicates the category of error and associate it with API support documentation or which the UI tier can use to render an appropriate message or hint. This provides a finer level of granularity than the statusCode. For example, instead of just 400 Bad Request, the type may be much more specific. such as integerValueNotInAllowedRange or numericValueExceedsMaximum or stringValueNotInAllowedSet.
occurredAt string(date-time)
An ISO 8601 UTC time stamp indicating when the error occurred.
attributes attributes
Data attribute associated with the error, such as values or constraints.
remediation string
An optional localized string which provides hints for how the user or client can resolve the error.
_embedded object
Optional embedded array of errors. This field may not exist if the error does not have nested errors.
items [errorResponse]
An array of error objects.

attributes

{}

Attributes

Properties

No properties

{
  "property1": {
    "href": "http://example.com",
    "type": "string",
    "templated": true,
    "title": "string",
    "deprecation": "http://example.com",
    "profile": "http://example.com"
  },
  "property2": {
    "href": "http://example.com",
    "type": "string",
    "templated": true,
    "title": "string",
    "deprecation": "http://example.com",
    "profile": "http://example.com"
  }
}

Links

Properties

Schema NameDescription
additionalProperties link
Describes a hypermedia link within a _links object in HAL representations. In Apiture APIs, links are HAL links, but Apiture APIs do not use the name or hreflang properties of HAL. Apiture links may include a method property.

{
  "href": "http://example.com",
  "type": "string",
  "templated": true,
  "title": "string",
  "deprecation": "http://example.com",
  "profile": "http://example.com"
}

Link

Properties

Schema NameDescription
href string(uri) (required)
The URI or URI template for the resource/operation this link refers to.
type string
The media type for the resource.
templated boolean
If true, the link's href is a URI template.
title string
An optional human-readable localized title for the link.
deprecation string(uri)
If present, the containing link is deprecated and the value is a URI which provides human-readable text information about the deprecation.
profile string(uri)
The URI of a profile document, a JSON document which describes the target resource/operation.