<commit_before>FORMAT: 1A
HOST: http://polls.apiblueprint.org/

# inpassing

A web API for managing the lending and borrowing of passes.

## Org [/orgs]

+ Attribute
    + id: 2 (number)
    + name: Locust Valley High School (string)

### Create a new org [POST]

+ Request (application/json)

        {
            "name": "Locust Valley High School"
        }

+ Response 201

    + Headers

            Location: /orgs/2

### Search orgs by name [GET /orgs/search{?q}]

+ Parameters

    - q: `Locust Valley` (string) - Query string

+ Response 200 (application/json)

        [
            {
                "id": 2,
                "name": "Locust Valley High School"
            }
        ]

### Query an org [GET /orgs/{id}]

+ Parameters

    - id (number) - Org ID

+ Request Anonymous

    Without authentication, only basic information about an org will be returned.
    
    + Body

+ Response 200 (application/json)

    + Attributes (Org)

+ Request Authenticated

    Use authentication to get more information about an org relevant to the user's role in that org.

    + Header
    
            Authorization: Bearer JWT
            
+ Response 200 (application/json)

    + Attributes (Org)
        + greeting_fmt: `Today is a {} day` (string) - The greeting format

## Day State [/orgs/{org_id}/daystates]

+ Attributes
    + id: 1 (number) - The ID of the day state.
    + Include Day State Create

### Query states [GET]

Return information about an org day state.

+ Parameters
    + org_id: 2 (number) - The org whose states are to be queried.

+ Request

    The authenticated user must be a participant or moderator of the org to query states.

    + Header
    
            Authorization: Bearer JWT
            
+ Response 200 (application/json)
    + Attributes (array[Day State])

### Create a state [POST]

Creates a new day state associated with a given organization.

+ Parameters
    + org_id: 2 (number) - The org that will receive the new state.

+ Request

    The authenticated user must moderate the org

    + Header
    
            Authorization: Bearer JWT
            
    + Attributes (Day State Create)
            
+ Response 201 (application/json)
    + Attributes (Day State)<commit_msg>Add endpoint for GETing a specific day state in doc<commit_after>FORMAT: 1A
HOST: http://polls.apiblueprint.org/

# inpassing

A web API for managing the lending and borrowing of passes.

## Org [/orgs]

+ Attribute
    + id: 2 (number)
    + name: Locust Valley High School (string)

### Create a new org [POST]

+ Request (application/json)

        {
            "name": "Locust Valley High School"
        }

+ Response 201

    + Headers

            Location: /orgs/2

### Search orgs by name [GET /orgs/search{?q}]

+ Parameters

    - q: `Locust Valley` (string) - Query string

+ Response 200 (application/json)

        [
            {
                "id": 2,
                "name": "Locust Valley High School"
            }
        ]

### Query an org [GET /orgs/{id}]

+ Parameters

    - id (number) - Org ID

+ Request Anonymous

    Without authentication, only basic information about an org will be returned.
    
    + Body

+ Response 200 (application/json)

    + Attributes (Org)

+ Request Authenticated

    Use authentication to get more information about an org relevant to the user's role in that org.

    + Header
    
            Authorization: Bearer JWT
            
+ Response 200 (application/json)

    + Attributes (Org)
        + greeting_fmt: `Today is a {} day` (string) - The greeting format

## Day State [/orgs/{org_id}/daystates]

+ Attributes
    + id: 1 (number) - The ID of the day state.
    + Include Day State Create

### Query state collection [GET]

Return information about an org day state.

+ Parameters
    + org_id: 2 (number) - The org whose states are to be queried.

+ Request

    The authenticated user must be a participant or moderator of the org to query states.

    + Header
    
            Authorization: Bearer JWT
            
+ Response 200 (application/json)
    + Attributes (array[Day State])

### Create a state [POST]

Creates a new day state associated with a given organization.

+ Parameters
    + org_id: 2 (number) - The org that will receive the new state.

+ Request

    The authenticated user must moderate the org

    + Header
    
            Authorization: Bearer JWT
            
    + Attributes (Day State Create)
            
+ Response 201 (application/json)
    + Attributes (Day State)

### Query a state [GET /orgs/{org_id}/daystates/{daystate_id}]

Returns a particular day state object.

+ Request

    + Header
    
            Authorization: Bearer JWT
            
+ Response 200 (application/json)
    + Attributes (Day State)
{'fraction_non_alphanumeric': 0.08816120906801007, 'fraction_numerical': 0.01112510495382032, 'mean_word_length': 2.2195945945945947, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3454312', 'n_tokens_mistral': 1466, 'n_tokens_neox': 1352, 'n_words': 525}