-
Notifications
You must be signed in to change notification settings - Fork 4
JuxtaWebServiceApi
KristinJensen edited this page Apr 4, 2012
·
4 revisions
- content types: application/json, multipart/form
- /source POST - returns a json array of source IDs created
If json is posted to this URL, the expected format is:
[
{name: 'name', type: 'xml|txt|url', data: 'data'}
]
For type: txt, data contains the raw text data for the source.
For type: xml, data contains the raw xml data for the source.
for type: url, data contains a url that will be spidered for content to make a source.
If the post is a muitipart/form, it is required to have at least two parts. They are either:
jsonHeader =
{
sourceName: 'sample.xml',
contentType = 'text/xml'
}
sourceFile = a file to be uploaded as a source.
or
sourceName: 'name.xml',
contentType: 'text/xml'.
sourceFile: a file to uploaded as source
NOTE: The multipart form may contain 3 parts. If so, the third will be jsonData. It must contain data as detailed in the json post example above.
- /source/{id}?range=0,100 (GET) - range is optional
- /source/{id} (DELETE)
-
content types: application/json, text/html
-
/source/{id}/revision (GET/POST)
GET [ {"name": "rev1", "sourceId": 1, "revisionIndexes": [10,34] } , {"name": "rev2", "sourceId": 1, "revisionIndexes": [0,1,2,3,4,5] } ]
POST { "name": "some", "sourceId": "88", "revisionIndexes": [0,1] }