Skip to content

Create cases in bulk from a challenge or a list of ids

POST
/api/v1/cases/import
curl --request POST \
--url https://example.com/api/v1/cases/import \
--header 'Content-Type: application/json' \
--data '{ "challenge_id": 1, "ids": [ 1 ], "limit": 100, "source": "maproulette" }'

Idempotent per id: existing cases are counted, not duplicated.

Media typeapplication/json
ImportRequest

Bulk create from MapRoulette or OSMCha, by explicit ids or by challenge.

object
challenge_id
Any of:
integer
>= 1
ids
Any of:
Array<integer>
<= 100 items
limit
Limit
integer
default: 100 >= 1 <= 100
source
required
Source
string
Allowed values: maproulette osmcha

Successful Response

Media typeapplication/json
ImportAccepted

Counts of cases created and already present, and the analysis jobs queued.

object
created
required
Created
integer
existing
required
Existing
integer
job_ids
Job Ids
Array<string>

Example generated

{
"created": 1,
"existing": 1,
"job_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

Bad Request

Problem

Application/problem+json body. Extension members (for example job_id) are allowed.

object
detail
Any of:
string
errors
Any of:
Array<object>
FieldError

One validation failure: where, what, and a stable machine code (never the input value).

object
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
instance
Any of:
string
request_id
required
Request Id
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
key
additional properties
any

Example

{
"type": "about:blank"
}

Unauthorized

Problem

Application/problem+json body. Extension members (for example job_id) are allowed.

object
detail
Any of:
string
errors
Any of:
Array<object>
FieldError

One validation failure: where, what, and a stable machine code (never the input value).

object
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
instance
Any of:
string
request_id
required
Request Id
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
key
additional properties
any

Example

{
"type": "about:blank"
}

Forbidden

Problem

Application/problem+json body. Extension members (for example job_id) are allowed.

object
detail
Any of:
string
errors
Any of:
Array<object>
FieldError

One validation failure: where, what, and a stable machine code (never the input value).

object
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
instance
Any of:
string
request_id
required
Request Id
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
key
additional properties
any

Example

{
"type": "about:blank"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string

Example generated

{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}

Bad Gateway

Problem

Application/problem+json body. Extension members (for example job_id) are allowed.

object
detail
Any of:
string
errors
Any of:
Array<object>
FieldError

One validation failure: where, what, and a stable machine code (never the input value).

object
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
instance
Any of:
string
request_id
required
Request Id
string
status
required
Status
integer
title
required
Title
string
type
Type
string
default: about:blank
key
additional properties
any

Example

{
"type": "about:blank"
}

Map data © OpenStreetMap contributors, under the Open Database Licence. Code under the Apache-2.0 licence. Made by Yogesh.

Changeset Second Opinion is an independent open source tool for OpenStreetMap reviewers. It is not endorsed by, sponsored by or affiliated with the OpenStreetMap Foundation. OpenStreetMap is a trademark of the OpenStreetMap Foundation, used under itstrademark policy.