Community

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sutaria
New Member

Batch mode help

Jump to solution

I am trying to make API calls on beta and I am getting a 404 error (remote server not found).

I have been able to make successful API calls in a non-batch mode.

I have a feeling its something to do with the parameters I am specifying for batch mode. Can someone please look at it and see if they find something obviously wrong? 

The URL I am using is - https://<canvas>.beta.instructure.com/api/v1/accounts/1/sis_imports.json

The parameters I am passing are –

Param

Value

import_type

instructure_csv

access_token

<token generated today>

extension

.zip

batch_mode

1

batch_mode_term_id=sis_term_id:

201805

1 Solution

Accepted Solutions
MattHanes
Community Champion

I can think of two things that might be the issue: 

  1. Make sure the token you generated was generated in Beta and not production. If you generate a token in Production, it won't be available in Beta until the next Beta reset.
  2. I'm really not sure on this one and it's really just a hunch, but I think your last parameter is supposed be sent like this:
    ParameterValue
    batch_mode_term_idsis_term_id:201805

View solution in original post

4 Replies
MattHanes
Community Champion

I can think of two things that might be the issue: 

  1. Make sure the token you generated was generated in Beta and not production. If you generate a token in Production, it won't be available in Beta until the next Beta reset.
  2. I'm really not sure on this one and it's really just a hunch, but I think your last parameter is supposed be sent like this:
    ParameterValue
    batch_mode_term_idsis_term_id:201805

@Matt - I found GOD today!!!!!!! You are my HERO!!!!! That was it, the parameter syntax. It fixed it. 

MattHanes
Community Champion

Glad I could help Smiley Happy

dtod
Community Member

FYI this has been driving me nuts. The DOCS don't seem to be accurate or I'm misreading them....anyway, just for the record in curl here's how to send files and parameters where as an example, my term id in my term feed is TC295-FA18

-F batch_mode=1 -F batch_mode_term_id=sis_term_id:TC295-FA18 -F attachment=@/pathtofile.csv