This project is providing AG Document Library API</br> Have feedback or questions? Please let us know!
Overview
In addition to being published and available at Document Library, the documents for hallways.cap.gsa.gov is also available via APIs.
Please note that the API v1.0
is available, now.
The URL for the API is https://api.gsa.gov/acquisition/cap/v1/
, and it exposes 4 routes to query data:
/tag-groups/<group id>/
/search/documents/<keyword>
/documents
/documents/<document id>
Getting Started
To begin using this API, you will need to register for an API Key. You can sign up for an API key below. After registration, you will need to provide this API key in the x-api-key
HTTP header with every API request.
HTTP Header Name | Description |
---|---|
x-api-key | API key from api.data.gov. For sample purposes, you can use DEMO_KEY as an API key. |
OpenAPI Specification File
You can view the full details of this API in the OpenAPI Specification file available here: Open API specification file for the Document Library API
The Response
The response represents the rows in the data
array in the JSON reports that can be downloaded. You may also downlow the document files.
They are returned as an array of JSON objects. Here is an example of one such object:
{
"id": 0,
"self": "string",
"title": "string",
"node_type": "string",
"description": "string",
"excerpt": "string",
"agency": {
"label": "string",
"id": 0
},
"type": [
{}
],
"acquisition_stage": [
{}
],
"contract_type": [
{}
],
"format": "string",
"public_private": true,
"file": [
null
],
"date_uploaded": "string",
"tags": [
null
],
"relevance": 0,
"views": 0,
"downloads": 0,
"comment_count": 0,
"updated": 0,
"sections": [
{}
]
}
Note that it has the following properties:
id
: The primary key of the data pointtitle
: The name of the documentdescription
: The description of the documentagency
: The name of the data point’s agencytype
: The type of document
Querying documents - API Calls
Documents can be queried…
Filtering/Sorting documents by parameters
Documents can be queried by filtering/sorting ?filter[key]=value&sorted
Ex. /documents?filter[id]=4138
It will return document id 4138. In this case, it is also equivalent to /documents/4138
HTTP Response Codes
The API will return one of the following responses:
HTTP Response Code | Description |
---|---|
200 | Successful. Data will be returned in JSON format. |
400 | Bad request. Verify the query string parameters that were provided. |
403 | API key is not correct or was not provided. |
4XX | Additional 400-level are caused by some type of error in the information submitted. |
Contact Us
To suggest a feature or ask for help, please file an issue in our project repository.