Skip to content

Instantly share code, notes, and snippets.

@bryceosterhaus
Last active October 31, 2017 21:10
Show Gist options
  • Save bryceosterhaus/d85f74fd953434a4854978a36e1e4010 to your computer and use it in GitHub Desktop.
Save bryceosterhaus/d85f74fd953434a4854978a36e1e4010 to your computer and use it in GitHub Desktop.
Faro new API

Not Working:

http://localhost:3000/o/faro/contacts/contacts_layout_template/33612

------WebKitFormBoundaryAlBQffgyAL9FsWLC
Content-Disposition: form-data; name="name"

default
------WebKitFormBoundaryAlBQffgyAL9FsWLC
Content-Disposition: form-data; name="settings"

[[{"contactsCardTemplateId":38916,"size":1}]]
------WebKitFormBoundaryAlBQffgyAL9FsWLC
Content-Disposition: form-data; name="type"

2
------WebKitFormBoundaryAlBQffgyAL9FsWLC
Content-Disposition: form-data; name="p_auth"

Mj8XK3e5
------WebKitFormBoundaryAlBQffgyAL9FsWLC--

Weird Response

http://localhost:3000/o/faro/contacts/data_source/csv/Appearances.csv/source_fields?count=10&fieldName=&p_auth=Mj8XK3e5

{
	'------WebKitFormBoundaryMOVMhcSei6FoJV2b': [
		'Content-Disposition: form-data; name="file"; filename="Appearances.csv"',
		'Content-Type: text/csv',
		'yearID',
		'1871',
		'1871',
		'1871',
		'1871',
		'1871',
		'1871',
		'1871'
	]
};

http://localhost:3000/o/faro/contacts/data_source/csv/Appearances.csv?p_auth=Mj8XK3e5

{
	contactsMappingSuggestions: {
		'------WebKitFormBoundaryMOVMhcSei6FoJV2b': []
	},
	sourceFields: {
		'------WebKitFormBoundaryMOVMhcSei6FoJV2b': [
			'Content-Disposition: form-data; name="file"; filename="Appearances.csv"'
		]
	}
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment