Skip to content

Commit 5068b20

Browse files
add outline of high-level API documentation
1 parent 87f0969 commit 5068b20

File tree

5 files changed

+78
-1
lines changed

5 files changed

+78
-1
lines changed

api/README.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Working with the ArchivesSpace API
2+
3+
## Authentication
4+
5+
Most actions against the backend require you to be logged in as a user
6+
with the appropriate permissions. By sending a request like:
7+
8+
POST /users/admin/login?password=login
9+
10+
your authentication request will be validated, and a session token
11+
will be returned in the JSON response for your request. To remain
12+
authenticated, provide this token with subsequent requests in the
13+
`X-ArchivesSpace-Session` header. For example:
14+
15+
X-ArchivesSpace-Session: 8e921ac9bbe9a4a947eee8a7c5fa8b4c81c51729935860c1adfed60a5e4202cb
16+
17+
18+
## CRUD
19+
20+
The ArchivesSpace API provides CRUD-style interactions for a number of
21+
different "top-level" record types. Working with records follows a
22+
fairly standard pattern:
23+
24+
# Get a paginated list of accessions from repository '123'
25+
GET /repositories/123/accessions?page=1
26+
27+
# Create a new accession, returning the ID of the new record
28+
POST /repositories/123/accessions
29+
{... a JSON document satisfying JSONModel(:accession) here ...}
30+
31+
# Get a single accession (returned as a JSONModel(:accession) instance) using the ID returned by the previous request
32+
GET /repositories/123/accessions/456
33+
34+
# Update an existing accession
35+
POST /repositories/123/accessions/456
36+
{... a JSON document satisfying JSONModel(:accession) here ...}
37+
38+
39+
## Detailed documentation
40+
41+
* [GET requests (retrieving records)](./get_requests.md)
42+
* [POST requests (creating and updating records)](./post_requests./md)
43+
* [DELETE requests](./delete_requests)
44+
* [API reference](http://archivesspace.github.io/archivesspace/api/) - Includes a complete list of available endpoints and guidance for their use

api/delete_requests.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Performing DELETE requests
2+
3+
> Additional documentation needed

api/get_requests.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Performing GET requests
2+
3+
## Resolving associated records
4+
5+
> Additional documentation needed
6+
7+
## Requests for paginated results
8+
9+
> Additional documentation needed
10+
11+
## Working with long results sets
12+
13+
> Additional documentation needed
14+
15+
## Search requests
16+
17+
> Additional documentation needed
18+
19+

api/post_requests.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Performing POST requests
2+
3+
## Updating existing records
4+
5+
> Additional documentation needed
6+
7+
## Creating new records
8+
9+
> Additional documentation needed

architecture/api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Working with the ArchivesSpace API
22

3+
> See **API section** for more detailed documentation
4+
35
## Authentication
46

57
Most actions against the backend require you to be logged in as a user
6-
with the appropriate permissions. By sending a request like:
8+
with the appropriate permissions. By sending a request like:
79

810
POST /users/admin/login?password=login
911

0 commit comments

Comments
 (0)